Function at 0x51fe30
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x581350
mov eax, dword fs:[0]
push eax
sub esp, 0xa8
mov eax, dword [0x61c948]
xor eax, esp
mov dword [esp + 0xa4], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x61c948]
xor eax, esp
push eax
lea eax, [esp + 0xbc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [esi]
mov edx, dword [eax + 8]
xor ebx, ebx
push ebx
push ebx
mov dword [esi + 0xa0], ebx
call edx
cmp dword [esi + 0xa0], ebx
jne 0x51fec6
xor edi, edi
push 1
lea eax, [esp + 0x18]
push eax
mov ecx, esi
call fcn.00574070
test al, al
je 0x51feb7
mov eax, dword [esp + 0x23]
mov ecx, dword [esp + 0x1f]
mov edx, dword [esi]
mov edx, dword [edx + 8]
push eax
push ecx
mov ecx, esi
call edx
add edi, 1
cmp edi, 4
jl 0x51fe88
jmp 0x51febc
cmp edi, 4
jl 0x51fec6
mov dword [esi + 0xa0], 2
mov eax, dword [esi]
mov edx, dword [eax + 8]
push ebx
push ebx
mov ecx, esi
call edx
cmp dword [esi + 0xa0], ebx
jne 0x51ff2f
xor ebp, ebp
jmp 0x51fee0
push 1
lea eax, [esp + 0x18]
push eax
mov ecx, esi
call fcn.005745f0
test al, al
je 0x51ff20
mov edi, dword [esi]
mov ecx, esi
add edi, 8
call fcn.004c5590
mov ecx, eax
movzx eax, word [esp + 0x1a]
mov ebx, edx
cdq
add ecx, eax
adc ebx, edx
mov edx, dword [edi]
push ebx
push ecx
mov ecx, esi
call edx
add ebp, 1
xor ebx, ebx
cmp ebp, 4
jl 0x51fee0
jmp 0x51ff25
cmp ebp, 4
jl 0x51ff2f
mov dword [esi + 0xa0], 4
mov eax, dword [esi]
mov edx, dword [eax + 8]
push ebx
push ebx
mov ecx, esi
call edx
cmp dword [esi + 0xa0], ebx
jne 0x51ffc7
xor edi, edi
mov ebp, 3
lea ecx, [ecx]
cmp edi, 4
jl 0x51ff69
mov ecx, esi
call fcn.004c5590
cmp edx, ebx
jg 0x51ffc7
jl 0x51ff69
cmp eax, 0x10000
jae 0x51ffc7
cmp dword [esi + 0xa0], ebx
jne 0x51ffc7
push ebx
push 0x10000
lea eax, [esp + 0x30]
push eax
mov ecx, esi
call fcn.00572170
test al, al
je 0x51ffc7
mov ecx, dword [esp + 0x28]
cmp cl, 0xba
jne 0x520017
lea ecx, [esp + 0x14]
push ecx
mov ecx, esi
call fcn.00572200
test al, al
je 0x52007c
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
shrd edx, eax, 3
mov dword [esi + 0xa0], 1
shr eax, 3
mov dword [esi + 0xc8], edx
mov edx, dword [esi]
mov eax, dword [edx + 8]
push ebx
push ebx
mov ecx, esi
call eax
cmp dword [esi + 0xa0], ebx
je 0x520391
cmp byte [esi + 0x28], 0
je 0x520084
mov ebp, dword [sym.imp.KERNEL32.dll_Sleep]
xor edi, edi
cmp edi, 0x32
jge 0x520009
mov ecx, esi
call fcn.004c57a0
cmp edx, ebx
jl 0x52000e
jg 0x520009
cmp eax, 0x19000
jb 0x52000e
cmp edi, 0x14
jge 0x520084
push 0x64
call ebp
add edi, 1
jmp 0x51fff0
mov dl, cl
and dl, 0xe0
cmp dl, 0xc0
je 0x52002e
mov al, cl
and al, 0xf0
cmp al, 0xe0
je 0x52002e
cmp cl, 0xbd
jne 0x52007c
xor eax, eax
push ecx
lea ecx, [esp + 0x34]
push ecx
mov ecx, esi
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov word [esp + 0x54], ax
call fcn.00572610
test al, al
je 0x52007c
push 1
push 0x18
mov ecx, esi
call fcn.004c55b0
cmp eax, 1
jne 0x52007c
cmp edx, ebx
jne 0x52007c
mov dword [esi + 0xa0], ebp
add edi, 1
jmp 0x51ff50
or ecx, 0xffffffff
mov eax, SysReAllocString
mov dword [esi + 0xb8], ecx
mov dword [esi + 0xa8], ecx
push 0xa
lea ecx, [esp + 0x54]
mov dword [esi + 0xbc], eax
mov dword [esi + 0xac], eax
mov dword [esi + 0xc0], ebx
mov dword [esi + 0xc4], ebx
mov dword [esi + 0xb0], ebx
mov dword [esi + 0xb4], ebx
call fcn.0051d0f0
mov dword [esp + 0xc4], ebx
xor edi, edi
mov ecx, esi
call fcn.004c57a0
mov ecx, eax
mov ebp, edx
mov eax, edi
cdq
push edx
push eax
push ebp
push ecx
call fcn.00473670
push ebx
push 5
push edx
push eax
call fcn.004735c0
mov dword [esp + 0x18], edx
lea edx, [esp + 0x14]
push edx
lea ecx, [esp + 0x54]
mov dword [esp + 0x18], eax
call fcn.0051d6e0
add edi, 1
cmp edi, 5
jle 0x5200d0
cmp dword [esp + 0x5c], 0
mov dword [esp + 0x18], 0
je 0x5201af
lea ecx, [esp + 0x50]
call fcn.0051d6a0
mov ecx, esi
mov ebp, eax
mov edi, edx
call fcn.004c57a0
sub eax, 0x20000
sbb edx, 0
cmp edx, edi
jg 0x52015c
jl 0x520148
cmp eax, ebp
jae 0x52015c
mov ecx, esi
call fcn.004c57a0
mov ebp, eax
mov edi, edx
sub ebp, 0x20000
sbb edi, 0
mov eax, dword [esp + 0x18]
cmp eax, edi
jl 0x52016e
jg 0x52016a
cmp ebx, ebp
jbe 0x52016e
mov ebp, ebx
mov edi, eax
or ebx, eax
mov eax, 0x500000
je 0x52017c
mov eax, 0x20000
cdq
mov ebx, eax
add ebx, ebp
adc edx, edi
push edx
push ebx
push edi
push ebp
mov ecx, esi
mov dword [esp + 0x3c], edx
call fcn.0051f910
mov edi, eax
test edi, edi
jl 0x520365
cmp dword [esp + 0x5c], 0
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x18], eax
jne 0x520122
mov eax, dword [esi + 0xc0]
sub eax, dword [esi + 0xb8]
mov ecx, dword [esi + 0xc4]
sbb ecx, dword [esi + 0xbc]
js 0x52037d
jg 0x5201d7
test eax, eax
jbe 0x52037d
mov edi, dword [esi + 0xb0]
sub edi, dword [esi + 0xa8]
mov ebp, dword [esi + 0xb4]
sbb ebp, dword [esi + 0xac]
js 0x52037d
jg 0x5201ff
test edi, edi
jbe 0x52037d
mov ebx, dword [esi + 0xc8]
push 0
push 0x989680
push ecx
push eax
mov dword [esp + 0x24], ebx
call fcn.00473670
push ebp
push edi
push edx
push eax
call fcn.004735c0
test ebx, ebx
mov ecx, eax
mov dword [esp + 0x28], ecx
je 0x52024f
fild dword [esp + 0x28]
fidiv dword [esp + 0x14]
fcomp qword [0x5d40a8]
fnstsw ax
test ah, 5
jnp 0x52024f
mov eax, ecx
sub eax, ebx
cdq
xor eax, edx
sub eax, edx
cmp eax, 0xc800
jge 0x520255
mov dword [esi + 0xc8], ecx
cmp dword [esi + 0xd8], 0
jne 0x52026b
cmp dword [esi + 0x110], 0
je 0x520340
lea ecx, [esp + 0x6c]
call fcn.00557c40
mov byte [esp + 0xb7], 0
mov byte [esp + 0xb6], 0
mov word [esp + 0xb4], 0
mov ecx, dword [0x59dbb4]
mov edx, dword [0x59dbb8]
mov eax, dword [0x59dbbc]
mov dword [esp + 0x6c], ecx
mov ecx, dword [0x59dbc0]
mov dword [esp + 0x78], ecx
mov ecx, dword [0x59df9c]
mov dword [esp + 0x70], edx
mov edx, dword [0x59df94]
mov dword [esp + 0x74], eax
mov eax, dword [0x59df98]
mov dword [esp + 0x84], ecx
mov ecx, dword [0x59dea8]
mov dword [esp + 0x7c], edx
mov edx, dword [0x59dfa0]
mov dword [esp + 0x80], eax
mov eax, dword [0x59dea4]
mov dword [esp + 0x9c], ecx
lea ecx, [esp + 0x6c]
mov dword [esp + 0x88], edx
mov edx, dword [0x59deac]
mov dword [esp + 0x98], eax
mov eax, dword [0x59deb0]
push ecx
lea ecx, [esi + 0x104]
mov byte [esp + 0xc8], 1
mov dword [esp + 0xa4], edx
mov dword [esp + 0xa8], eax
call fcn.0051e790
lea ecx, [esp + 0x6c]
mov byte [esp + 0xc4], 0
call fcn.00557c30
mov edx, dword [esi]
mov eax, dword [edx + 8]
push 0
push 0
mov ecx, esi
call eax
lea ecx, [esp + 0x50]
mov dword [esp + 0xc4], 0xffffffff
call fcn.0051d720
xor eax, eax
jmp 0x520396
lea ecx, [esp + 0x50]
mov dword [esp + 0xc4], 0xffffffff
call fcn.0051d720
mov eax, edi
jmp 0x520396
lea ecx, [esp + 0x50]
mov dword [esp + 0xc4], 0xffffffff
call fcn.0051d720
mov eax, 0x80004005
mov ecx, dword [esp + 0xbc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xa4]
xor ecx, esp
call fcn.004721e8
add esp, 0xb4
ret