Function at 0x51d410
Capabilities:
Hash data using sha1

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x6b2b92
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x1d78
call fcn.005cd2a0
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 [0x22033cc]
mov eax, dword [ebp + 8]
push ebx
push ebx
push ecx
push eax
mov byte [esp + 0x1da4], 1
call dword [sym.imp.USER32.dll_SendMessageA]
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 0x51d4a3
cmp esi, ebx
mov edi, dword [esp + 0x14]
mov dword [esp + 0x14], ebx
je 0x51d499
mov eax, dword [esi]
lea ecx, [esp + 0x14]
push ecx
push 0x6c4d9c
push esi
call dword [eax]
cmp edi, ebx
je 0x51d4a3
mov edx, dword [edi]
push edi
call dword [edx + 8]
cmp dword [esp + 0x14], ebx
je 0x51d8f1
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, 0x100
lea edi, [esp + 0x988]
rep stosd dword es:[edi], eax
mov ecx, 0x100
lea edi, [esp + 0x588]
rep stosd dword es:[edi], eax
mov ecx, 0x400
lea edi, [esp + 0xd88]
push 0x70e240
mov byte [esp + 0x88], al
rep stosd dword es:[edi], eax
call fcn.005d0050
mov ecx, dword [0x223f100]
add ecx, 0x24c
push ecx
lea edx, [esp + 0x6c]
push 0x6be170
push edx
call fcn.005cd489
mov esi, 0xc3d2e1f0
lea eax, [esp + 0x74]
add esp, 0x10
mov dword [ebp + 0x618], 0x67452301
mov dword [ebp + 0x61c], 0xefcdab89
mov dword [ebp + 0x620], 0x98badcfe
mov dword [ebp + 0x624], 0x10325476
mov dword [ebp + 0x628], esi
mov dword [ebp + 0x62c], ebx
mov dword [ebp + 0x630], ebx
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x51d572
sub eax, edi
push eax
lea eax, [esp + 0x68]
push eax
mov ecx, ebp
call fcn.0051c4c0
mov ecx, ebp
call fcn.0051c5a0
push ebx
lea ecx, [esp + 0x98c]
push ecx
mov ecx, ebp
call fcn.0051c6c0
xor eax, eax
mov ecx, 0x100
lea edi, [esp + 0x188]
rep stosd dword es:[edi], eax
mov eax, dword [0x223f100]
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.005cd489
push 0x70e240
call fcn.005d0050
lea eax, [esp + 0x1a0]
mov dword [ebp + 0x628], esi
add esp, 0x18
mov dword [ebp + 0x618], 0x67452301
mov dword [ebp + 0x61c], 0xefcdab89
mov dword [ebp + 0x620], 0x98badcfe
mov dword [ebp + 0x624], 0x10325476
mov dword [ebp + 0x62c], ebx
mov dword [ebp + 0x630], ebx
lea esi, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x51d630
sub eax, esi
push eax
lea ecx, [esp + 0x18c]
push ecx
mov ecx, ebp
call fcn.0051c4c0
mov ecx, ebp
call fcn.0051c5a0
push ebx
lea edx, [esp + 0x58c]
push edx
mov ecx, ebp
call fcn.0051c6c0
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.005cd489
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 [sym.imp.OLEAUT32.dll_VariantClear]
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.0051caf0
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.0051caf0
lea eax, [esp + 0xd88]
mov byte [esp + 0x1d94], 5
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x51d713
sub eax, edx
mov esi, eax
push esi
push ebx
push 0x11
call dword [sym.imp.OLEAUT32.dll_SafeArrayCopyData]
mov edi, eax
cmp edi, ebx
je 0x51d7de
lea eax, [esp + 0x1c]
push eax
push edi
mov dword [esp + 0x24], ebx
call dword [sym.imp.OLEAUT32.dll_SafeArrayUnaccessData]
test eax, eax
je 0x51d7b2
mov esi, dword [sym.imp.OLEAUT32.dll_VariantCopy]
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 0x51d77d
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov eax, dword [esp + 0x18]
cmp eax, ebx
mov dword [esp + 0x1d94], 0xffffffff
je 0x51d906
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 0x51d7d3
jmp 0x51d7c0
mov dl, byte [esp + eax + 0xd88]
mov ecx, dword [esp + 0x1c]
mov byte [eax + ecx], dl
inc eax
cmp eax, esi
jl 0x51d7c0
push edi
call dword [sym.imp.OLEAUT32.dll_SafeArrayGetElement]
test eax, eax
je 0x51d834
mov esi, dword [sym.imp.OLEAUT32.dll_VariantCopy]
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 0x51d815
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [esp + 0x18]
cmp eax, ebx
mov dword [esp + 0x1d94], 0xffffffff
je 0x51d906
mov edx, dword [eax]
push eax
jmp 0x51d903
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 [sym.imp.OLEAUT32.dll_VariantCopy]
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 0x51d768
cmp dword [ebp + 8], ebx
je 0x51d768
mov esi, dword [sym.imp.USER32.dll_ShowWindow]
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 0x51d8c0
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov eax, dword [esp + 0x18]
cmp eax, ebx
mov dword [esp + 0x1d94], 0xffffffff
je 0x51d8d9
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 0x51d906
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