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

Disassembly:
push 0xffffffffffffffff
push 0x4298d0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x54
push ebx
push ebp
push esi
mov esi, ecx
xor ebx, ebx
push edi
mov eax, dword [esi + 0x2c]
mov dword [esp + 0x1c], esi
mov eax, dword [eax + 0x4f8]
cmp eax, ebx
je 0x404994
cmp dword [esi], eax
je 0x404994
mov ecx, esi
call fcn.004047c0
cmp eax, ebx
je 0x404ba4
mov dword [esp + 0x54], ebx
mov dword [esp + 0x58], ebx
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x60], ebx
mov ebx, dword [esp + 0x78]
xor ecx, ecx
mov cl, byte [esi + 0x10]
mov eax, dword [ebx]
mov edi, ecx
shr edi, 3
mov ecx, dword [ebx + 4]
cmp edi, 4
mov dword [esp + 0x30], edi
mov dword [esp + 0x44], eax
mov edx, dword [ebx + 8]
mov dword [esp + 0x4c], edx
mov ebx, dword [ebx + 0xc]
mov dword [esp + 0x50], ebx
jae 0x4049e7
cmp edi, 1
mov ebp, eax
jne 0x4049de
and ebp, 3
jmp 0x4049e1
and ebp, 1
sub eax, ebp
mov dword [esp + 0x44], eax
mov ebp, dword [esi + 8]
imul eax, edi
imul ebp, ecx
add eax, ebp
mov ebp, dword [esi + 0x24]
add ebp, eax
add eax, dword [esi]
cmp ecx, ebx
mov dword [esp + 0x34], ebp
mov dword [esp + 0x20], eax
mov dword [esp + 0x10], ecx
jge 0x404ba4
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x50]
mov ebx, ebp
mov ebp, dword [esp + 0x20]
add eax, 0x20
mov dword [esp + 0x28], ebx
cmp eax, ecx
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x40], eax
mov dword [esp + 0x78], eax
jl 0x404a36
mov dword [esp + 0x78], ecx
mov ecx, dword [esp + 0x44]
cmp ecx, edx
mov dword [esp + 0x18], ecx
jge 0x404b76
jmp 0x404a50
mov ecx, dword [esp + 0x18]
mov edi, dword [esp + 0x30]
lea eax, [ecx + 0x20]
cmp eax, edx
mov dword [esp + 0x24], eax
mov dword [esp + 0x14], eax
jl 0x404a63
mov dword [esp + 0x14], edx
mov esi, dword [esp + 0x14]
sub esi, ecx
mov ecx, dword [esp + 0x78]
imul esi, edi
mov edi, dword [esp + 0x10]
cmp edi, ecx
jae 0x404b4e
push esi
push ebx
push ebp
call fcn.004208f0
add esp, 0xc
test eax, eax
jne 0x404aa4
mov edx, dword [esp + 0x1c]
mov eax, dword [edx + 8]
add ebp, eax
add ebx, eax
mov eax, dword [esp + 0x78]
inc edi
cmp edi, eax
jb 0x404a7c
jmp 0x404b46
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov dword [esp + 0x54], ecx
lea ecx, [esp + 0x54]
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x78]
push ecx
lea ecx, [esp + 0x40]
mov dword [esp + 0x60], edx
mov dword [esp + 0x64], eax
call fcn.004015e0
mov ecx, dword [esp + 0x74]
lea edx, [esp + 0x38]
push eax
push edx
mov dword [esp + 0x74], 0
call fcn.004017d0
mov ecx, dword [esp + 0x74]
push eax
mov byte [esp + 0x70], 1
call fcn.00401650
lea ecx, [esp + 0x38]
mov byte [esp + 0x6c], 0
call fcn.00401640
lea ecx, [esp + 0x3c]
mov dword [esp + 0x6c], 0xffffffff
call fcn.00401640
mov eax, dword [esp + 0x78]
cmp edi, eax
jae 0x404b46
sub eax, edi
mov dword [esp + 0x18], eax
push esi
push ebp
push ebx
call fcn.004205b0
mov eax, dword [esp + 0x28]
add esp, 0xc
mov eax, dword [eax + 8]
add ebp, eax
add ebx, eax
mov eax, dword [esp + 0x18]
dec eax
mov dword [esp + 0x18], eax
jne 0x404b25
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x24]
mov ebx, dword [esp + 0x28]
mov ebp, dword [esp + 0x2c]
add ebx, esi
add ebp, esi
cmp eax, edx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x18], eax
jl 0x404a48
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x30]
mov eax, dword [esi + 8]
mov ebp, dword [esp + 0x34]
mov ebx, dword [esp + 0x20]
mov ecx, dword [esp + 0x50]
shl eax, 5
add ebp, eax
add ebx, eax
mov eax, dword [esp + 0x40]
mov dword [esp + 0x34], ebp
cmp eax, ecx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x10], eax
jl 0x404a0d
mov ecx, dword [esp + 0x64]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x60
ret 8