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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
push 0xffffffffffffffff
push 0x44a1f8
mov eax, dword fs:[0]
push eax
sub esp, 0x68
push ebx
push esi
push edi
mov eax, dword [0x45e7b0]
xor eax, esp
push eax
lea eax, [esp + 0x78]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0xe4]
push eax
call fcn.0041cc9a
mov eax, dword [eax + 0x78]
mov ecx, dword [eax]
call fcn.0040a4a0
lea eax, [esi + 0x3e4]
mov dword [esp + 0x18], eax
call fcn.0040e8b0
lea ecx, [esi + 0x80]
call fcn.0040b670
test eax, eax
jne 0x4079b2
push 0x10
push eax
push 0x4527ec
mov ecx, esi
call fcn.004178d3
mov edi, dword [esi + 0x88]
xor eax, eax
mov dword [esp + 0x1c], eax
mov dword [esi + 0xe8], eax
cmp edi, eax
je 0x407e58
call fcn.004156e6
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x407e6d
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea ebx, [eax + 0x10]
mov dword [esp + 0x24], ebx
mov dword [esp + 0x80], 0
mov ecx, dword [edi + 8]
lea eax, [ecx - 0x10]
lea esi, [ebx - 0x10]
cmp eax, esi
je 0x407a59
cmp dword [esi + 0xc], 0
lea ebx, [esi + 0xc]
jl 0x407a47
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x407a47
push eax
call fcn.0040af90
mov dword [esp + 0x2c], eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x407a3a
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov ebx, dword [esp + 0x28]
add ebx, 0x10
mov dword [esp + 0x24], ebx
jmp 0x407a59
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [esp + 0x2c]
call fcn.0040aef0
mov ebx, dword [esp + 0x24]
push ecx
mov ecx, dword [ebx - 0x10]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
add ebx, 0xfffffff0
mov dword [esp + 0x3c], esp
mov dword [esp + 0x2c], esp
mov dword [esp + 0x3c], ebx
call eax
cmp dword [ebx + 0xc], 0
lea ecx, [ebx + 0xc]
jl 0x407a8d
cmp eax, dword [ebx]
jne 0x407a8d
mov esi, ebx
mov edx, 1
lock xadd dword [ecx], edx
jmp 0x407ac1
mov ecx, dword [ebx + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 1
push ecx
mov ecx, eax
call edx
mov esi, eax
test esi, esi
je 0x407e77
mov eax, dword [ebx + 4]
mov dword [esi + 4], eax
mov eax, dword [ebx + 4]
inc eax
push eax
add ebx, 0x10
push ebx
push eax
lea ecx, [esi + 0x10]
push ecx
call fcn.00431405
add esp, 0x10
mov edx, dword [esp + 0x2c]
mov ecx, dword [ebp + 8]
add esi, 0x10
mov dword [edx], esi
call fcn.00403a00
mov ecx, dword [edi + 8]
mov esi, dword [esp + 0x18]
push eax
mov eax, dword [esp + 0x20]
push ecx
push eax
call fcn.0040ea20
mov ebx, eax
mov eax, dword [edi + 0x18]
push eax
push 1
push ebx
mov dword [esp + 0x28], ebx
call fcn.0040e9e0
mov ecx, dword [ebp + 8]
mov eax, dword [edi + 8]
mov esi, dword [ecx + ebx*4 + 0xec]
lea ecx, [ecx + ebx*4 + 0xec]
add eax, 0xfffffff0
sub esi, 0x10
cmp eax, esi
je 0x407b69
cmp dword [esi + 0xc], 0
jl 0x407b5c
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x407b5c
push eax
call fcn.0040af90
mov dword [esp + 0x2c], eax
add esp, 4
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x407b47
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov ecx, dword [esp + 0x28]
mov edx, dword [ebp + 8]
add ecx, 0x10
lea eax, [edx + ebx*4 + 0xec]
mov dword [eax], ecx
jmp 0x407b69
mov eax, dword [edi + 8]
mov edx, dword [eax - 0xc]
push edx
push eax
call fcn.0040aef0
mov eax, dword [ebp + 8]
mov edx, dword [edi + 0x18]
mov esi, dword [eax + ebx*4 + 0x16c]
lea ecx, [eax + ebx*4 + 0x16c]
lea eax, [edx - 0x10]
sub esi, 0x10
mov dword [esp + 0x28], ecx
cmp eax, esi
je 0x407bda
cmp dword [esi + 0xc], 0
jl 0x407bcc
mov ecx, dword [eax]
cmp ecx, dword [esi]
jne 0x407bcc
push eax
call fcn.0040af90
mov dword [esp + 0x24], eax
add esp, 4
lea eax, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [eax], edx
dec edx
test edx, edx
jg 0x407bbd
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x28]
add eax, 0x10
mov dword [ecx], eax
jmp 0x407bda
mov eax, dword [edx - 0xc]
mov ecx, dword [esp + 0x28]
push eax
push edx
call fcn.0040aef0
mov eax, dword [ebp + 8]
mov esi, dword [esp + 0x18]
mov ecx, 1
add dword [eax + 0xe8], ecx
cmp dword [edi + 0x28], ecx
jne 0x407c6e
push 0x452824
push 2
push ebx
call fcn.0040e9e0
call fcn.004156e6
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x407e6d
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x20], eax
lea ecx, [edi + 0x70]
push ecx
lea ecx, [esp + 0x24]
mov byte [esp + 0x84], 1
call fcn.0040a3c0
mov edx, dword [esp + 0x20]
push edx
push 5
push ebx
call fcn.0040e9e0
mov byte [esp + 0x80], 0
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407c87
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x407c87
push 0x452828
push 2
push ebx
call fcn.0040e9e0
mov eax, dword [edi + 0x14]
push eax
push 5
push ebx
call fcn.0040e9e0
mov eax, dword [edi + 0xc]
mov esi, dword [esp + 0x18]
push eax
push 3
push ebx
call fcn.0040e9e0
mov eax, dword [edi + 0x10]
push eax
push 6
push ebx
call fcn.0040e9e0
mov eax, dword [edi + 0x10]
push 0x452744
push eax
call fcn.00432247
add esp, 8
test eax, eax
sete al
test al, al
jne 0x407cd7
mov eax, dword [edi + 0x10]
push 0x452768
push eax
call fcn.00432247
add esp, 8
test eax, eax
sete al
test al, al
je 0x407ce0
mov eax, ebx
mov ebx, esi
call fcn.0040f8f0
mov eax, dword [edi + 0x3c]
mov ecx, dword [edi + 0x38]
shrd ecx, eax, 0x14
shr eax, 0x14
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], eax
fild qword [esp + 0x3c]
fmul qword [0x453528]
fstp qword [esp + 0x2c]
call fcn.004156e6
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x407e6d
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x20], eax
fld qword [esp + 0x2c]
sub esp, 8
mov byte [esp + 0x88], 2
fstp qword [esp]
lea ecx, [esp + 0x28]
push str._06.2f_GB
push ecx
call fcn.0040a6c0
mov ebx, dword [esp + 0x30]
mov esi, dword [ebx - 0xc]
xor eax, eax
add esp, 0x10
mov dword [esp + 0x28], eax
test esi, esi
jle 0x407ded
jmp 0x407d66
mov eax, dword [esp + 0x28]
lea ecx, [eax + 1]
mov dword [esp + 0x2c], ecx
test ecx, ecx
jl 0x407e7c
cmp ecx, esi
jg 0x407e7c
cmp byte [ecx + ebx], 0x2e
je 0x407ded
test eax, eax
jl 0x407e7c
cmp eax, esi
jg 0x407e7c
cmp byte [eax + ebx], 0x30
jne 0x407ded
cmp eax, esi
jge 0x407e7c
cmp dword [ebx - 4], 1
jle 0x407dc0
mov edx, dword [ebx - 0xc]
push edx
lea ecx, [esp + 0x24]
call fcn.0040ad80
mov ebx, dword [esp + 0x20]
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x28]
mov byte [eax + ebx], 0x20
test esi, esi
jl 0x407e7c
cmp esi, dword [ebx - 8]
jg 0x407e7c
mov dword [ebx - 0xc], esi
mov byte [esi + ebx], 0
mov esi, dword [ebx - 0xc]
mov eax, ecx
cmp eax, esi
mov dword [esp + 0x28], eax
jl 0x407d62
mov eax, dword [esp + 0x1c]
mov esi, dword [esp + 0x18]
push ebx
push 4
push eax
call fcn.0040e9e0
mov edi, dword [edi]
inc dword [esp + 0x1c]
add ebx, 0xfffffff0
mov byte [esp + 0x80], 0
lea ecx, [ebx + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407e28
mov ecx, dword [ebx]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebx
call edx
mov eax, dword [esp + 0x38]
mov dword [esp + 0x80], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407e50
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test edi, edi
jne 0x4079cc
mov ecx, dword [esp + 0x78]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0x80004005
call fcn.0040b0a0
call fcn.0040af80
push 0x80070057
call fcn.0040b0a0
int3