Function at 0x507d80
Capabilities:
Hash data using sha1

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x69ff22
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x1d78
call fcn.005ba830
push ebx
push ebp
push esi
push edi
mov ebp, ecx
xor ebx, ebx
mov dword [esp + 0x1d94], ebx
mov dword [esp + 0x14], ebx
mov ecx, dword [0x21ee170]
mov eax, dword [ebp + 8]
push ebx
push ebx
push ecx
push eax
mov byte [esp + 0x1da4], 1
call dword [0x6a84c4]
xor edx, edx
mov esi, eax
cmp esi, ebx
setne dl
mov dword [esp + 0x18], esi
dec edx
and edx, 0x80004005
mov dword [esp + 0x1c], edx
jne 0x507e13
cmp esi, ebx
mov edi, dword [esp + 0x14]
mov dword [esp + 0x14], ebx
je 0x507e09
mov eax, dword [esi]
lea ecx, [esp + 0x14]
push ecx
push 0x6b0de4
push esi
call dword [eax]
cmp edi, ebx
je 0x507e13
mov edx, dword [edi]
push edi
call dword [edx + 8]
cmp dword [esp + 0x14], ebx
je 0x508261
xor eax, eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], eax
mov ecx, pe_nt_image_headers32
lea edi, [esp + 0x988]
rep stosd dword es:[edi], eax
mov ecx, pe_nt_image_headers32
lea edi, [esp + 0x588]
rep stosd dword es:[edi], eax
mov ecx, 0x400
lea edi, [esp + 0xd88]
push 0x6fa7a0
mov byte [esp + 0x88], al
rep stosd dword es:[edi], eax
call fcn.005bcc48
mov ecx, dword [0x2227970]
add ecx, 0x24c
push ecx
lea edx, [esp + 0x6c]
push 0x6aae14
push edx
call fcn.005baa1d
mov esi, 0xc3d2e1f0
lea eax, [esp + 0x74]
add esp, 0x10
mov dword [ebp + 0x514], 0x67452301
mov dword [ebp + 0x518], 0xefcdab89
mov dword [ebp + 0x51c], 0x98badcfe
mov dword [ebp + 0x520], 0x10325476
mov dword [ebp + 0x524], esi
mov dword [ebp + 0x528], ebx
mov dword [ebp + 0x52c], ebx
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x507ee2
sub eax, edi
push eax
lea eax, [esp + 0x68]
push eax
mov ecx, ebp
call fcn.00506e30
mov ecx, ebp
call fcn.00506f10
push ebx
lea ecx, [esp + 0x98c]
push ecx
mov ecx, ebp
call fcn.00507030
xor eax, eax
mov ecx, pe_nt_image_headers32
lea edi, [esp + 0x188]
rep stosd dword es:[edi], eax
mov eax, dword [0x2227970]
push str.SHAIYA_CRYPT_KEY
lea edx, [eax + 0x26f]
push edx
add eax, 0x24c
push eax
lea eax, [esp + 0x194]
push str._s_s_s
push eax
call fcn.005baa1d
push 0x6fa7a0
call fcn.005bcc48
lea eax, [esp + 0x1a0]
mov dword [ebp + 0x524], esi
add esp, 0x18
mov dword [ebp + 0x514], 0x67452301
mov dword [ebp + 0x518], 0xefcdab89
mov dword [ebp + 0x51c], 0x98badcfe
mov dword [ebp + 0x520], 0x10325476
mov dword [ebp + 0x528], ebx
mov dword [ebp + 0x52c], ebx
lea esi, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x507fa0
sub eax, esi
push eax
lea ecx, [esp + 0x18c]
push ecx
mov ecx, ebp
call fcn.00506e30
mov ecx, ebp
call fcn.00506f10
push ebx
lea edx, [esp + 0x58c]
push edx
mov ecx, ebp
call fcn.00507030
lea eax, [esp + 0x588]
push eax
lea ecx, [esp + 0x68]
push ecx
lea edx, [esp + 0xd90]
push str.id_schk_s
push edx
call fcn.005baa1d
mov eax, dword [esp + 0x24]
mov ecx, dword [eax]
add esp, 0x10
push 0xffffffffffffffff
push eax
call dword [ecx + 0xcc]
mov ecx, 9
mov esi, str.https:__cb.shaiya.jp_cb_auth.action
lea edi, [esp + 0x88]
rep movsd dword es:[edi], dword [esi]
mov esi, dword [0x6a83f0]
lea edx, [esp + 0x30]
xor eax, eax
mov ecx, 0x37
lea edi, [esp + 0xac]
push edx
rep stosd dword es:[edi], eax
call esi
lea eax, [esp + 0x88]
push eax
lea ecx, [esp + 0x54]
mov byte [esp + 0x1d98], 2
mov word [esp + 0x54], bx
call fcn.00507460
lea ecx, [esp + 0x20]
push ecx
call esi
push str.Content_Type:_application_x_www_form_urlencoded_n
lea ecx, [esp + 0x44]
mov byte [esp + 0x1d98], 4
mov word [esp + 0x44], bx
call fcn.00507460
lea eax, [esp + 0xd88]
mov byte [esp + 0x1d94], 5
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x508083
sub eax, edx
mov esi, eax
push esi
push ebx
push 0x11
call dword [0x6a8400]
mov edi, eax
cmp edi, ebx
je 0x50814e
lea eax, [esp + 0x1c]
push eax
push edi
mov dword [esp + 0x24], ebx
call dword [0x6a83fc]
test eax, eax
je 0x508122
mov esi, dword [0x6a83f4]
lea ecx, [esp + 0x40]
push ecx
call esi
lea edx, [esp + 0x20]
push edx
call esi
lea eax, [esp + 0x50]
push eax
call esi
lea ecx, [esp + 0x30]
push ecx
call esi
mov eax, dword [esp + 0x14]
cmp eax, ebx
mov byte [esp + 0x1d94], bl
je 0x5080ed
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov eax, dword [esp + 0x18]
cmp eax, ebx
mov dword [esp + 0x1d94], 0xffffffff
je 0x508276
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
xor al, al
mov ecx, dword [esp + 0x1d8c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
cmp esi, ebx
jle 0x508143
jmp 0x508130
mov dl, byte [esp + eax + 0xd88]
mov ecx, dword [esp + 0x1c]
mov byte [eax + ecx], dl
inc eax
cmp eax, esi
jl 0x508130
push edi
call dword [0x6a83f8]
test eax, eax
je 0x5081a4
mov esi, dword [0x6a83f4]
lea edx, [esp + 0x40]
push edx
call esi
lea eax, [esp + 0x20]
push eax
call esi
lea ecx, [esp + 0x50]
push ecx
call esi
lea edx, [esp + 0x30]
push edx
call esi
mov eax, dword [esp + 0x14]
cmp eax, ebx
mov byte [esp + 0x1d94], bl
je 0x508185
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [esp + 0x18]
cmp eax, ebx
mov dword [esp + 0x1d94], 0xffffffff
je 0x508276
mov edx, dword [eax]
push eax
jmp 0x508273
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x40]
push edx
lea edx, [esp + 0x24]
push edx
lea edx, [esp + 0x38]
push edx
push edx
lea edx, [esp + 0x60]
push edx
mov word [esp + 0x34], 0x2011
mov dword [esp + 0x3c], edi
mov ecx, dword [eax]
push eax
call dword [ecx + 0xd0]
mov esi, dword [0x6a83f4]
lea eax, [esp + 0x40]
push eax
call esi
lea ecx, [esp + 0x20]
push ecx
call esi
lea edx, [esp + 0x50]
push edx
call esi
lea eax, [esp + 0x30]
push eax
call esi
mov eax, dword [ebp + 4]
cmp eax, ebx
je 0x5080d8
cmp dword [ebp + 8], ebx
je 0x5080d8
mov esi, dword [0x6a8524]
push ebx
push eax
call esi
mov ecx, dword [ebp + 8]
push ebx
push ecx
call esi
mov eax, dword [esp + 0x14]
cmp eax, ebx
mov byte [ebp + 0x14], bl
mov byte [esp + 0x1d94], bl
je 0x508230
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov eax, dword [esp + 0x18]
cmp eax, ebx
mov dword [esp + 0x1d94], 0xffffffff
je 0x508249
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov al, 1
mov ecx, dword [esp + 0x1d8c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
cmp esi, ebx
mov dword [esp + 0x1d94], 0xffffffff
je 0x508276
mov edx, dword [esi]
push esi
call dword [edx + 8]
mov ecx, dword [esp + 0x1d8c]
pop edi
xor al, al
mov dword fs:[0], ecx
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret