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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4ce703
mov eax, dword fs:[0]
push eax
sub esp, 0x58
push ebx
push esi
push edi
mov eax, dword [0x50397c]
xor eax, esp
push eax
lea eax, [esp + 0x68]
mov dword fs:[0], eax
call fcn.004161c0
mov dword [esp + 0x50], eax
mov byte [eax + 0x15], 1
mov eax, dword [esp + 0x50]
mov dword [eax + 4], eax
mov eax, dword [esp + 0x50]
mov dword [eax], eax
mov eax, dword [esp + 0x50]
xor ebx, ebx
mov dword [eax + 8], eax
mov dword [esp + 0x54], ebx
mov edx, dword [ebp + 8]
mov dword [esp + 0x70], ebx
mov eax, dword [edx + 0x28]
mov edi, dword [eax - 0xc]
cmp edi, 1
mov dword [esp + 0x20], edi
jae 0x4137d7
mov dword [esp + 0x70], 0xffffffff
mov eax, dword [esp + 0x50]
mov edx, dword [eax]
push eax
lea ecx, [esp + 0x50]
push ecx
mov esi, ecx
push edx
push esi
lea ecx, [esp + 0x54]
push ecx
mov edi, esi
call fcn.00415520
mov edx, dword [esp + 0x50]
push edx
jmp 0x413b70
mov dword [esp + 0x18], ebx
jmp 0x4137e0
mov esi, dword [edx + 0x24]
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x413a3c
mov eax, dword [esi + 8]
sub eax, ecx
sar eax, 3
cmp ebx, eax
jae 0x413a3c
test ecx, ecx
je 0x41380e
mov eax, dword [esi + 8]
sub eax, ecx
sar eax, 3
cmp ebx, eax
jb 0x413813
call fcn.004aa383
mov eax, dword [esi + 4]
lea edx, [eax + ebx*8]
mov ecx, edi
lea esi, [esp + 0x1c]
mov dword [esp + 0x14], edx
call fcn.004091a0
mov ecx, esi
lea eax, [esp + 0x4c]
mov byte [esp + 0x70], 1
call fcn.00483b10
mov ebx, dword [esp + 0x50]
cmp eax, ebx
lea ecx, [esp + 0x4c]
mov dword [esp + 0x30], eax
mov dword [esp + 0x2c], ecx
je 0x41389e
mov eax, dword [eax + 0xc]
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x413a32
mov ecx, eax
mov eax, dword [esp + 0x1c]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x41388a
test dx, dx
je 0x413886
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x41388a
add eax, 4
add ecx, 4
test dx, dx
jne 0x413864
xor eax, eax
jmp 0x41388f
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
setl al
test al, al
jne 0x41389e
lea eax, [esp + 0x2c]
jmp 0x4138ae
lea edx, [esp + 0x4c]
mov dword [esp + 0x38], ebx
mov dword [esp + 0x34], edx
lea eax, [esp + 0x34]
mov edi, dword [eax]
test edi, edi
mov esi, dword [eax + 4]
mov dword [esp + 0x48], esi
je 0x4138c3
lea eax, [esp + 0x4c]
cmp edi, eax
je 0x4138c8
call fcn.004aa383
cmp esi, ebx
je 0x41393e
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx]
mov ecx, dword [esp + 0x20]
mov eax, dword [edx - 0xc]
add ecx, 1
cmp eax, ecx
jbe 0x41390e
test edi, edi
jne 0x4138e9
call fcn.004aa383
cmp esi, dword [edi + 4]
jne 0x4138f3
call fcn.004aa383
mov esi, dword [esi + 0x10]
mov edx, dword [esp + 0x18]
add esi, 8
lea ebx, [esp + 0x24]
mov dword [esp + 0x24], edx
call fcn.00410800
mov esi, dword [esp + 0x48]
test edi, edi
jne 0x413917
call fcn.004aa383
cmp esi, dword [edi + 4]
jne 0x413921
call fcn.004aa383
mov eax, dword [esp + 0x14]
fld dword [eax + 4]
mov esi, dword [esi + 0x10]
fstp dword [esp + 0x24]
fld dword [esi + 4]
fadd dword [esp + 0x24]
fstp dword [esi + 4]
jmp 0x4139f8
push 0x18
call fcn.004a91fd
add esp, 4
mov dword [esp + 0x24], eax
test eax, eax
mov byte [esp + 0x70], 2
je 0x413964
mov ecx, dword [esp + 0x14]
push ecx
push eax
call fcn.004119c0
mov edi, eax
jmp 0x413966
xor edi, edi
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x20]
mov byte [esp + 0x70], 1
mov eax, dword [edx]
mov eax, dword [eax - 0xc]
add ecx, 1
cmp eax, ecx
jbe 0x413993
mov edx, dword [esp + 0x18]
lea esi, [edi + 8]
lea ebx, [esp + 0x24]
mov dword [esp + 0x24], edx
call fcn.00410800
mov eax, dword [esp + 0x14]
fld dword [eax + 4]
mov eax, dword [esp + 0x1c]
fstp dword [esp + 0x24]
add eax, 0xfffffff0
fld dword [edi + 4]
fadd dword [esp + 0x24]
fstp dword [edi + 4]
call fcn.00402a60
lea esi, [eax + 0x10]
mov dword [esp + 0x3c], esi
mov dword [esp + 0x40], edi
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x5c]
push edx
lea ebx, [esp + 0x54]
mov byte [esp + 0x78], 3
call fcn.00414240
lea eax, [esi - 0x10]
mov byte [esp + 0x70], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4139f8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x70], 0
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x413a1d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add dword [esp + 0x18], 1
mov edx, dword [ebp + 8]
mov edi, dword [esp + 0x20]
mov ebx, dword [esp + 0x18]
jmp 0x4137e0
push 0x80004005
call fcn.00402940
mov ecx, dword [esp + 0x54]
lea edi, [edx + 4]
push ecx
mov esi, edi
call fcn.00413ec0
mov edx, dword [esp + 0x50]
mov ebx, dword [edx]
lea esi, [esp + 0x4c]
mov dword [esp + 0x28], ebx
mov dword [esp + 0x24], esi
lea ecx, [ecx]
test esi, esi
mov eax, dword [esp + 0x50]
mov dword [esp + 0x48], eax
je 0x413a74
lea ecx, [esp + 0x4c]
cmp esi, ecx
je 0x413a79
call fcn.004aa383
cmp ebx, dword [esp + 0x48]
je 0x413b0d
test esi, esi
jne 0x413a8c
call fcn.004aa383
cmp ebx, dword [esi + 4]
jne 0x413a96
call fcn.004aa383
mov eax, dword [edi + 4]
add ebx, 0x10
test eax, eax
jne 0x413aa4
xor edx, edx
jmp 0x413aac
mov edx, dword [edi + 8]
sub edx, eax
sar edx, 2
test eax, eax
je 0x413adc
mov ecx, dword [edi + 0xc]
sub ecx, eax
sar ecx, 2
cmp edx, ecx
jae 0x413adc
mov eax, dword [edi + 8]
mov edx, dword [ebx]
mov dword [eax], edx
add eax, 4
lea esi, [esp + 0x24]
mov dword [edi + 8], eax
call fcn.004156a0
mov ebx, dword [esp + 0x28]
mov esi, dword [esp + 0x24]
jmp 0x413a60
mov esi, dword [edi + 8]
cmp eax, esi
jbe 0x413ae8
call fcn.004aa383
push esi
push edi
push ebx
lea eax, [esp + 0x48]
push eax
mov eax, edi
call fcn.004144a0
lea esi, [esp + 0x24]
call fcn.004156a0
mov ebx, dword [esp + 0x28]
mov esi, dword [esp + 0x24]
jmp 0x413a60
mov ebx, dword [edi + 8]
cmp dword [edi + 4], ebx
jbe 0x413b1a
call fcn.004aa383
mov esi, dword [edi + 4]
cmp esi, dword [edi + 8]
jbe 0x413b27
call fcn.004aa383
cmp edi, edi
je 0x413b30
call fcn.004aa383
mov ecx, ebx
sub ecx, esi
push 0x413720
sar ecx, 2
push ecx
push ebx
push esi
call fcn.00416830
add esp, 0x10
mov dword [esp + 0x70], 0xffffffff
mov eax, dword [esp + 0x50]
mov edx, dword [eax]
push eax
lea ecx, [esp + 0x50]
push ecx
push edx
mov esi, ecx
push esi
lea edx, [esp + 0x54]
push edx
mov edi, ecx
call fcn.00415520
mov eax, dword [esp + 0x50]
push eax
call fcn.004a91d0
add esp, 4
mov ecx, dword [esp + 0x68]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4