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

Disassembly:
sub esp, 0x4c
push ebx
push ebp
push esi
push edi
push dword [esp + 0x64]
xor ebp, ebp
mov ebx, ecx
push dword [esp + 0x64]
mov dword [esp + 0x18], ebp
call fcn.100043a0
add esp, 8
test eax, eax
js 0x1000542b
mov ecx, ebx
call fcn.10002f20
test eax, eax
jne 0x1000542b
lea esi, [ebx + 0x78]
nop dword [eax]
test esi, esi
je 0x1000517b
cmp dword [esi], 0
je 0x1000517b
push 0
lea edx, [esp + 0x3c]
mov ecx, esi
call fcn.1000e360
add esp, 4
test eax, eax
jle 0x10005170
mov ecx, dword [ebx + 0x60]
lea edx, [esp + 0x38]
mov edi, dword [ebx + 0x48]
shl ecx, 5
add ecx, edi
call fcn.10006e50
mov ecx, eax
mov dword [esp + 0x24], ecx
test ecx, ecx
jns 0x10005035
cmp dword [esi], 0
je 0x10004f80
mov edx, dword [esi + 0x24]
cmp dword [esi + 0x20], edx
jle 0x10004f80
mov eax, dword [esi + 0x10]
lea ecx, [eax + edx*4]
mov eax, dword [ecx]
test eax, 0x400
je 0x10004ff9
add dword [esi + 0x158], 1
lea eax, [edx + 1]
mov dword [esi + 0x24], eax
adc dword [esi + 0x15c], 0
jmp 0x10004f80
movzx edi, al
cmp edi, 0xff
jne 0x10005019
mov eax, dword [ecx + 4]
lea ecx, [ecx + 4]
and eax, 0xff
inc edx
add edi, eax
cmp eax, 0xff
je 0x10005004
add dword [esi + 0xc], edi
lea eax, [edx + 1]
add dword [esi + 0x158], 1
mov dword [esi + 0x24], eax
adc dword [esi + 0x15c], 0
jmp 0x10004f80
test ebp, ebp
je 0x10005049
lea eax, [ecx + ebp]
sar eax, 2
cdq
add dword [ebx + 0x50], eax
adc edx, dword [ebx + 0x54]
mov dword [ebx + 0x54], edx
mov eax, dword [edi + 0x1c]
test eax, eax
je 0x10005055
mov eax, dword [eax + 4]
jmp 0x10005058
or eax, 0xffffffff
add eax, ecx
sar eax, 2
cdq
add eax, dword [ebx + 0x50]
adc edx, dword [ebx + 0x54]
cmp edx, dword [esp + 0x64]
jg 0x10005311
jl 0x1000507c
mov ebp, dword [esp + 0x60]
cmp eax, ebp
jae 0x10005315
cmp dword [esi], 0
je 0x100050cf
mov edx, dword [esi + 0x24]
cmp dword [esi + 0x20], edx
jle 0x100050cf
mov eax, dword [esi + 0x10]
lea ecx, [eax + edx*4]
mov eax, dword [ecx]
test eax, 0x400
jne 0x100050bb
movzx edi, al
cmp edi, 0xff
jne 0x100050b8
mov eax, dword [ecx + 4]
lea ecx, [ecx + 4]
and eax, 0xff
inc edx
add edi, eax
cmp eax, 0xff
je 0x100050a3
add dword [esi + 0xc], edi
add dword [esi + 0x158], 1
lea eax, [edx + 1]
mov dword [esi + 0x24], eax
adc dword [esi + 0x15c], 0
push 0
lea edx, [esp + 0x3c]
lea ecx, [ebx + 0x230]
call fcn.10006c10
add esp, 4
lea ecx, [ebx + 0x1e0]
lea edx, [ebx + 0x230]
call fcn.10005a80
mov edx, dword [esp + 0x4c]
cmp edx, 0xffffffff
jl 0x10005163
mov ecx, dword [esp + 0x48]
jg 0x10005108
cmp ecx, 0xffffffff
jbe 0x10005163
mov edi, dword [ebx + 0x60]
mov eax, edi
mov ebp, dword [ebx + 0x44]
shl eax, 4
sub ecx, dword [eax + ebp]
sbb edx, dword [eax + ebp + 4]
mov dword [ebx + 0x50], ecx
mov dword [ebx + 0x54], edx
test edx, edx
jg 0x10005149
jl 0x1000512a
test ecx, ecx
jae 0x10005149
xorps xmm0, xmm0
mov dword [ebx + 0x50], 0
movlpd qword [esp + 0x18], xmm0
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
mov dword [ebx + 0x54], 0
test edi, edi
jle 0x10005163
lea eax, [ebp + 8]
add ecx, dword [eax]
adc edx, dword [eax + 4]
lea eax, [eax + 0x10]
mov dword [ebx + 0x50], ecx
mov dword [ebx + 0x54], edx
sub edi, 1
jne 0x10005150
mov ebp, dword [esp + 0x24]
mov dword [esp + 0x10], ebp
jmp 0x10004f80
jns 0x1000517b
cmp eax, 0xfffffffd
jne 0x10005311
push 0xffffffffffffffff
push 0xffffffffffffffff
lea edx, [esp + 0x30]
mov ecx, ebx
call fcn.10001b80
add esp, 8
test edx, edx
jl 0x10005311
jg 0x1000519f
test eax, eax
jb 0x10005311
mov edi, dword [esp + 0x28]
test byte [edi + 5], 2
je 0x100051e9
lea ecx, [ebx + 0x1e0]
call fcn.100059a0
lea ebp, [ebx + 0x230]
mov ecx, ebp
call fcn.10005660
mov eax, dword [ebp + 0x44]
test eax, eax
je 0x100051d1
push eax
call fcn.1001791b
add esp, 4
push 0x58
push 0
push ebp
call fcn.1000fa00
mov ebp, dword [esp + 0x1c]
add esp, 0xc
mov dword [ebx + 0x58], 2
cmp dword [ebx + 0x58], 3
jge 0x10005301
movzx edx, byte [edi + 0x11]
movzx eax, byte [edi + 0x10]
mov ecx, dword [ebx + 0x34]
shl edx, 8
or edx, eax
movzx eax, byte [edi + 0xf]
shl edx, 8
or edx, eax
movzx eax, byte [edi + 0xe]
shl edx, 8
or edx, eax
xor eax, eax
test ecx, ecx
jle 0x1000522e
mov ebp, ecx
mov ecx, dword [ebx + 0x40]
cmp dword [ecx], edx
je 0x1000522c
inc eax
add ecx, 4
cmp eax, ebp
jl 0x10005220
mov ecx, ebp
mov ebp, dword [esp + 0x10]
cmp eax, ecx
je 0x10004f80
mov dword [ebx + 0x60], eax
mov dword [ebx + 0x58], 3
movzx ecx, byte [edi + 0x11]
movzx eax, byte [edi + 0x10]
shl ecx, 8
or ecx, eax
movzx eax, byte [edi + 0xf]
shl ecx, 8
or ecx, eax
movzx eax, byte [edi + 0xe]
shl ecx, 8
or ecx, eax
mov dword [ebx + 0x5c], ecx
test esi, esi
je 0x100052ec
cmp dword [esi], 0
je 0x100052ec
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x1c], 0
mov dword [esi + 0x20], 0
mov dword [esi + 0x24], 0
mov dword [esi + 0x144], 0
mov dword [esi + 0x148], 0
mov dword [esi + 0x14c], 0
mov dword [esi + 0x154], 0xffffffff
mov dword [esi + 0x158], 0
mov dword [esi + 0x15c], 0
mov dword [esi + 0x160], 0
mov dword [esi + 0x164], 0
mov dword [esi + 0x150], edx
mov ecx, ebx
call fcn.10002f20
test eax, eax
jne 0x1000542b
xor ebp, ebp
mov dword [esp + 0x10], ebp
lea edx, [esp + 0x28]
mov ecx, esi
call fcn.1000df50
jmp 0x10004f80
mov ebp, dword [esp + 0x60]
mov ecx, dword [ebx + 0x54]
mov esi, dword [esp + 0x64]
mov eax, dword [ebx + 0x50]
mov dword [ebx + 0x68], 0
mov dword [ebx + 0x6c], 0
mov dword [ebx + 0x70], 0
mov dword [ebx + 0x74], 0
cmp ecx, esi
jg 0x10005429
jl 0x1000534d
cmp eax, ebp
jae 0x10005429
lea edi, [ebx + 0x1f4]
mov dword [esp + 0x18], eax
mov dword [esp + 0x24], ecx
nop dword [eax + eax]
sub ebp, eax
mov dword [esp + 0x10], edi
sbb esi, ecx
mov ecx, dword [ebx + 0x1f8]
mov dword [esp + 0x14], esi
cmp ecx, 0xffffffff
jle 0x1000538f
mov esi, dword [edi]
cmp ecx, esi
jge 0x10005385
sub esi, ecx
mov dword [esp + 0x10], edi
jmp 0x10005391
lea eax, [ebx + 0x1f4]
mov dword [esp + 0x10], eax
xor esi, esi
mov eax, esi
cdq
cmp edx, dword [esp + 0x14]
jl 0x100053a6
jg 0x100053a0
cmp eax, ebp
jbe 0x100053a6
mov edi, dword [esp + 0x10]
mov esi, ebp
test esi, esi
je 0x100053b1
lea eax, [ecx + esi]
cmp eax, dword [edi]
jg 0x100053bf
add ecx, esi
lea edi, [ebx + 0x1f4]
mov dword [ebx + 0x1f8], ecx
mov eax, esi
cdq
mov esi, eax
mov ecx, edx
add esi, dword [esp + 0x18]
mov dword [ebx + 0x50], esi
adc ecx, dword [esp + 0x24]
mov dword [ebx + 0x54], ecx
cmp edx, dword [esp + 0x14]
jg 0x10005401
jl 0x100053e0
cmp eax, ebp
jae 0x10005401
sub esp, 8
mov ecx, ebx
call fcn.10003020
add esp, 8
test eax, eax
jg 0x10005401
or edx, 0xffffffff
mov ecx, ebx
call fcn.10003af0
mov dword [ebx + 0x50], eax
mov dword [ebx + 0x54], edx
mov ecx, dword [ebx + 0x54]
mov esi, dword [esp + 0x64]
mov eax, dword [ebx + 0x50]
mov ebp, dword [esp + 0x60]
mov dword [esp + 0x18], eax
mov dword [esp + 0x24], ecx
cmp ecx, esi
jl 0x10005360
jg 0x10005429
cmp eax, ebp
jb 0x10005360
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret