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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x90
mov esi, ecx
mov edx, dword [ebp + 8]
cmp dword [edx + 4], 0
jne 0x40bcd3
mov eax, dword [edx + 0xc]
mov ecx, dword [eax + 0x10]
test ecx, 0x100
mov dword [esp + 0xc], esi
jne 0x40b8ac
mov ebx, dword [eax + 8]
test cl, 1
jne 0x40b9b1
add ebx, 0xffffffff
js 0x40bccf
lea edi, [esp + 0x20]
lea esi, [esp + 0x3c]
jmp 0x40b7fc
add ebx, 0xffffffff
mov edx, dword [ebp + 8]
js 0x40bccf
xorps xmm0, xmm0
movaps xmmword [esp + 0x20], xmm0
mov eax, dword [edx]
mov ecx, edi
push ebx
push edx
call dword [eax + 8]
mov byte [esp + 0x50], 0
mov dword [esp + 0x58], 0xffffffff
mov eax, dword [esp + 0x2c]
cmp eax, 0xffffffff
je 0x40bd63
mov ecx, dword [0x54e184]
mov dword [esp + 0x14], ecx
mov ecx, dword [0x54e180]
mov dword [esp + 0x10], ecx
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x54]
push ecx
push esi
call dword [esp + eax*4 + 0x1c]
add esp, 0xc
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x58], eax
test eax, eax
je 0x40b870
cmp eax, 1
jne 0x40bd63
cmp dword [esp + 0x54], 1
jne 0x40b7f0
jmp 0x40bd31
mov eax, dword [ebp + 0x10]
cmp dword [esp + 0x28], eax
jne 0x40b7f0
mov eax, dword [ebp + 0x10]
push eax
push dword [ebp + 0xc]
push eax
push dword [esp + 0x30]
call fcn.0041ed00
add esp, 0x10
test eax, eax
jne 0x40b7f0
mov esi, dword [esp + 0xc]
mov dword [esi + 4], ebx
mov dword [esi + 0xc], 0
jmp 0x40bce1
test cl, 1
jne 0x40baa2
mov dword [esp + 0x3c], 0
lea edi, [esp + 0x3c]
mov ecx, edi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.0041c740
mov ecx, edi
call fcn.0041c870
mov edx, dword [ebp + 8]
mov edi, eax
mov eax, dword [edx + 0xc]
mov esi, dword [eax + 8]
add esi, 0xffffffff
js 0x40bcb3
lea ebx, [esp + 0x38]
jmp 0x40b8fc
add esi, 0xffffffff
mov edx, dword [ebp + 8]
js 0x40bcb3
xorps xmm0, xmm0
movaps xmmword [esp + 0x20], xmm0
mov eax, dword [edx]
lea ecx, [esp + 0x20]
push esi
push edx
call dword [eax + 0xc]
mov byte [esp + 0x70], 0
mov dword [esp + 0x78], 0xffffffff
mov eax, dword [esp + 0x2c]
cmp eax, 0xffffffff
je 0x40bd63
mov ecx, dword [0x54e17c]
mov dword [esp + 0x14], ecx
mov ecx, dword [0x54e178]
mov dword [esp + 0x10], ecx
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x74]
push ecx
push ebx
call dword [esp + eax*4 + 0x1c]
add esp, 0xc
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x78], eax
test eax, eax
je 0x40b970
cmp eax, 1
jne 0x40bd63
cmp dword [esp + 0x74], 1
jne 0x40b8f0
jmp 0x40bd45
cmp edi, dword [esp + 0x28]
jne 0x40b8f0
push edi
push dword [esp + 0x40]
push dword [esp + 0x2c]
call sub.api_ms_win_crt_private_l1_1_0.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x40b8f0
mov eax, dword [esp + 0xc]
mov dword [eax + 4], esi
mov esi, eax
mov dword [eax + 0xc], 0
lea ecx, [esp + 0x3c]
call fcn.0041c850
jmp 0x40bce1
add ebx, 0xffffffff
js 0x40bccf
xor edi, edi
jmp 0x40b9f7
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [esp + 0x30]
push dword [esp + 0x30]
call fcn.0041ed00
add esp, 0x10
test eax, eax
je 0x40bcfe
lea ecx, [esi + 1]
add esi, 0xffffffff
test eax, eax
cmovs edi, ecx
cmovns ebx, esi
cmp ebx, edi
mov edx, dword [ebp + 8]
jl 0x40bccf
mov eax, ebx
sub eax, edi
mov esi, eax
shr esi, 0x1f
add esi, eax
sar esi, 1
add esi, edi
xorps xmm0, xmm0
movaps xmmword [esp + 0x20], xmm0
mov eax, dword [edx]
lea ecx, [esp + 0x20]
push esi
push edx
call dword [eax + 8]
mov byte [esp + 0x60], 0
mov dword [esp + 0x68], 0xffffffff
mov eax, dword [esp + 0x2c]
cmp eax, 0xffffffff
je 0x40bd63
mov ecx, dword [0x54e184]
mov dword [esp + 0x14], ecx
mov ecx, dword [0x54e180]
mov dword [esp + 0x10], ecx
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x64]
push ecx
lea ecx, [esp + 0x44]
push ecx
call dword [esp + eax*4 + 0x1c]
add esp, 0xc
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x68], eax
test eax, eax
je 0x40b9c0
cmp eax, 1
jne 0x40bd63
mov eax, 0xffffffff
cmp dword [esp + 0x64], 1
jne 0x40b9de
movsd xmm0, qword [esp + 0x24]
mov esi, dword [esp + 0xc]
movsd qword [esi + 4], xmm0
mov eax, 1
mov dword [esi + 0xc], eax
jmp 0x40bce1
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0x18], 0
add edi, 4
je 0x40bb7e
js 0x40bd68
lea eax, [edi + edi]
push eax
call fcn.004227e0
add esp, 4
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], eax
lea ecx, [eax + edi*2]
mov dword [esp + 0x18], ecx
mov ecx, dword [ebp + 0x10]
and ecx, 3
je 0x40bced
xor edx, edx
nop word cs:[eax + eax]
nop
mov word [eax], 0
mov eax, dword [esp + 0x14]
add eax, 2
mov dword [esp + 0x14], eax
add edx, 1
cmp ecx, edx
jne 0x40bb00
mov ecx, edi
sub ecx, edx
cmp dword [ebp + 0x10], 0xfffffffc
ja 0x40bb78
nop word cs:[eax + eax]
nop dword [eax + eax]
mov word [eax], 0
mov eax, dword [esp + 0x14]
lea edx, [eax + 2]
mov dword [esp + 0x14], edx
mov word [eax + 2], 0
mov eax, dword [esp + 0x14]
lea edx, [eax + 2]
mov dword [esp + 0x14], edx
mov word [eax + 2], 0
mov eax, dword [esp + 0x14]
lea edx, [eax + 2]
mov dword [esp + 0x14], edx
mov word [eax + 2], 0
mov eax, dword [esp + 0x14]
add eax, 2
mov dword [esp + 0x14], eax
add ecx, 0xfffffffc
jne 0x40bb30
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xc]
mov dword [esp + 0x48], edi
mov ebx, dword [eax + 8]
add ebx, 0xffffffff
js 0x40bcbe
xor edi, edi
jmp 0x40bbf6
mov eax, dword [esp + 0x10]
mov dword [esp + 0x44], eax
push dword [esp + 0x48]
push eax
push dword [esp + 0x30]
push dword [esp + 0x30]
call fcn.0041f0d0
add esp, 0x10
mov ecx, dword [esp + 0x44]
sub eax, ecx
sar eax, 1
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push eax
push ecx
call fcn.0041ed00
add esp, 0x10
test eax, eax
je 0x40bd0e
lea ecx, [esi + 1]
add esi, 0xffffffff
test eax, eax
cmovs edi, ecx
cmovns ebx, esi
cmp ebx, edi
mov edx, dword [ebp + 8]
jl 0x40bcbe
mov eax, ebx
sub eax, edi
mov esi, eax
shr esi, 0x1f
add esi, eax
sar esi, 1
add esi, edi
xorps xmm0, xmm0
movaps xmmword [esp + 0x20], xmm0
mov eax, dword [edx]
lea ecx, [esp + 0x20]
push esi
push edx
call dword [eax + 0xc]
mov byte [esp + 0x80], 0
mov dword [esp + 0x88], 0xffffffff
mov eax, dword [esp + 0x2c]
cmp eax, 0xffffffff
je 0x40bd63
mov ecx, dword [0x54e17c]
mov dword [esp + 0x40], ecx
mov ecx, dword [0x54e178]
mov dword [esp + 0x3c], ecx
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x84]
push ecx
lea ecx, [esp + 0x40]
push ecx
call dword [esp + eax*4 + 0x48]
add esp, 0xc
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x88], eax
test eax, eax
je 0x40bba0
cmp eax, 1
jne 0x40bd63
mov eax, 0xffffffff
cmp dword [esp + 0x84], 1
jne 0x40bbdd
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov esi, dword [esp + 0xc]
mov dword [esi + 8], ecx
mov dword [esi + 4], eax
mov dword [esi + 0xc], 1
mov eax, dword [esp + 0x10]
jmp 0x40bd22
lea ecx, [esp + 0x3c]
call fcn.0041c850
jmp 0x40bccf
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40bccf
push eax
call fcn.00422980
add esp, 4
mov esi, dword [esp + 0xc]
mov dword [esi + 8], 0
mov dword [esi + 0xc], 1
mov eax, esi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret 0xc
mov ecx, edi
cmp dword [ebp + 0x10], 0xfffffffc
jbe 0x40bb30
jmp 0x40bb78
mov eax, dword [esp + 0xc]
mov dword [eax + 4], esi
mov esi, eax
xor eax, eax
mov dword [esi + 0xc], eax
jmp 0x40bce1
mov eax, dword [esp + 0xc]
mov dword [eax + 4], esi
mov esi, eax
mov dword [eax + 0xc], 0
mov eax, dword [esp + 0x44]
test eax, eax
je 0x40bce1
push eax
call fcn.00422980
add esp, 4
jmp 0x40bce1
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov esi, dword [esp + 0xc]
mov dword [esi + 8], ecx
mov dword [esi + 4], eax
jmp 0x40bcda
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov esi, dword [esp + 0xc]
mov dword [esi + 8], ecx
mov dword [esi + 4], eax
mov dword [esi + 0xc], 1
jmp 0x40b9a3
call fcn.00403db0
lea ecx, [esp + 0x10]
call fcn.00439ba0
nop word cs:[eax + eax]
nop dword [eax + eax]
xor eax, eax
cmp dword [ecx + 4], 0
je 0x40bd89
ret
mov eax, dword [ecx + 0xc]
mov eax, dword [eax + 8]
ret