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

Disassembly:
push 0xffffffffffffffff
push 0x4a0c49
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4cd4a4]
xor eax, esp
push eax
lea eax, [esp + 0x50]
mov dword fs:[0], eax
mov ebp, ecx
mov dword [esp + 0x1c], ebp
xor edi, edi
mov dword [esp + 0x14], edi
cmp dword [ebp + 0x2298], edi
mov dword [esp + 0x58], edi
jne 0x405a49
push 0x80004003
call fcn.0049fa80
mov esi, dword [ebp + 0x2298]
mov eax, dword [esi]
mov edx, dword [eax + 0x110]
lea ecx, [esp + 0x18]
push ecx
push esi
call edx
cmp eax, edi
jge 0x405a6f
push 0x4b3a68
push esi
push eax
call fcn.0049fa90
cmp dword [esp + 0x18], edi
jne 0x405a80
mov eax, dword [esp + 0x60]
cmp eax, edi
jmp 0x405daa
xor esi, esi
mov dword [esp + 0x18], esi
mov ebx, 1
cmp dword [ebp + 0x22b8], ebx
mov byte [esp + 0x58], 1
jl 0x405d93
cmp ebx, 1
jne 0x405ad2
cmp dword [ebp + 0x229c], 0
jne 0x405ab4
push 0x80004003
call fcn.0049fa80
mov ecx, dword [ebp + 0x229c]
push 1
lea eax, [esp + 0x28]
push eax
call fcn.00403960
or dword [esp + 0x14], 1
mov byte [esp + 0x58], 2
jmp 0x405afb
test esi, esi
jne 0x405ae0
push 0x80004003
call fcn.0049fa80
push 0x4cd4c8
push 0x4cd4c8
lea ecx, [esp + 0x28]
push ecx
mov ecx, esi
call fcn.00403800
or dword [esp + 0x14], 2
mov eax, dword [eax]
cmp esi, eax
je 0x405b21
test eax, eax
mov edi, esi
mov esi, eax
mov dword [esp + 0x18], esi
je 0x405b15
mov edx, dword [eax]
push eax
mov eax, dword [edx + 4]
call eax
test edi, edi
je 0x405b21
mov ecx, dword [edi]
mov edx, dword [ecx + 8]
push edi
call edx
test byte [esp + 0x14], 2
je 0x405b3d
mov eax, dword [esp + 0x20]
and dword [esp + 0x14], 0xfffffffd
test eax, eax
je 0x405b3d
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
test byte [esp + 0x14], 1
mov dword [esp + 0x58], 1
je 0x405b61
mov eax, dword [esp + 0x24]
and dword [esp + 0x14], 0xfffffffe
test eax, eax
je 0x405b61
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
test esi, esi
jne 0x405b6f
push 0x80004003
call fcn.0049fa80
mov eax, dword [esi]
mov edx, dword [eax + 0x110]
lea ecx, [esp + 0x28]
push ecx
push esi
call edx
test eax, eax
jge 0x405b8f
push 0x4b3a68
push esi
push eax
call fcn.0049fa90
cmp dword [esp + 0x28], 0
je 0x405d7d
mov ecx, dword [esp + 0x70]
lea eax, [esp + 0x2c]
push eax
mov dword [esp + 0x30], ebx
call fcn.00405990
mov ecx, dword [esi]
mov eax, dword [ecx + 0x110]
lea edx, [esp + 0x30]
push edx
push esi
call eax
test eax, eax
jge 0x405bcc
push 0x4b3a68
push esi
push eax
call fcn.0049fa90
cmp ebx, dword [ebp + 0x22b8]
jg 0x405cc1
mov ebp, dword [esp + 0x30]
lea esp, [esp]
push 0x4cd4c8
push 0x4cd4c8
lea ecx, [esp + 0x3c]
push ecx
mov ecx, esi
call fcn.00403800
mov eax, dword [eax]
cmp esi, eax
je 0x405c1c
test eax, eax
mov edi, esi
mov esi, eax
mov dword [esp + 0x18], esi
je 0x405c10
mov edx, dword [eax]
push eax
mov eax, dword [edx + 4]
call eax
test edi, edi
je 0x405c1c
mov ecx, dword [edi]
mov edx, dword [ecx + 8]
push edi
call edx
mov eax, dword [esp + 0x34]
test eax, eax
je 0x405c2c
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
test esi, esi
jne 0x405c3a
push 0x80004003
call fcn.0049fa80
mov eax, dword [esi]
mov edx, dword [eax + 0x110]
lea ecx, [esp + 0x38]
push ecx
push esi
call edx
test eax, eax
jge 0x405c5a
push 0x4b3a68
push esi
push eax
call fcn.0049fa90
cmp dword [esp + 0x38], ebp
jne 0x405c75
mov eax, dword [esp + 0x1c]
add ebx, 1
cmp ebx, dword [eax + 0x22b8]
jle 0x405be0
jmp 0x405cc1
push 0x4cd4c8
push 0x4cd4c8
lea ecx, [esp + 0x44]
push ecx
mov ecx, esi
call fcn.00403860
mov eax, dword [eax]
cmp esi, eax
je 0x405cb1
test eax, eax
mov edi, esi
mov esi, eax
mov dword [esp + 0x18], esi
je 0x405ca5
mov edx, dword [eax]
push eax
mov eax, dword [edx + 4]
call eax
test edi, edi
je 0x405cb1
mov ecx, dword [edi]
mov edx, dword [ecx + 8]
push edi
call edx
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x405cc1
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov ebp, dword [esp + 0x74]
mov ecx, dword [ebp + 4]
test ecx, ecx
mov dword [esp + 0x2c], ebx
jne 0x405cd4
xor edx, edx
jmp 0x405cdc
mov edx, dword [ebp + 8]
sub edx, ecx
sar edx, 2
test ecx, ecx
je 0x405cf9
mov eax, dword [ebp + 0xc]
sub eax, ecx
sar eax, 2
cmp edx, eax
jae 0x405cf9
mov eax, dword [ebp + 8]
mov dword [eax], ebx
add eax, 4
mov dword [ebp + 8], eax
jmp 0x405d19
mov edi, dword [ebp + 8]
cmp ecx, edi
jbe 0x405d06
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
lea eax, [esp + 0x2c]
push eax
push edi
push ebp
lea ecx, [esp + 0x4c]
push ecx
mov ecx, ebp
call fcn.00405890
mov ebp, dword [esp + 0x78]
mov ecx, dword [ebp + 4]
test ecx, ecx
mov dword [esp + 0x2c], 0xfffffffc
jne 0x405d30
xor edx, edx
jmp 0x405d38
mov edx, dword [ebp + 8]
sub edx, ecx
sar edx, 2
test ecx, ecx
je 0x405d59
mov eax, dword [ebp + 0xc]
sub eax, ecx
sar eax, 2
cmp edx, eax
jae 0x405d59
mov eax, dword [ebp + 8]
mov dword [eax], 0xfffffffc
add eax, 4
mov dword [ebp + 8], eax
jmp 0x405d79
mov edi, dword [ebp + 8]
cmp ecx, edi
jbe 0x405d66
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
lea edx, [esp + 0x2c]
push edx
push edi
push ebp
lea eax, [esp + 0x54]
push eax
mov ecx, ebp
call fcn.00405800
mov ebp, dword [esp + 0x1c]
mov eax, dword [esp + 0x6c]
add dword [eax], 1
add ebx, 1
cmp ebx, dword [ebp + 0x22b8]
jle 0x405a9c
test esi, esi
mov byte [esp + 0x58], 0
je 0x405da4
mov ecx, dword [esi]
mov edx, dword [ecx + 8]
push esi
call edx
mov eax, dword [esp + 0x60]
test eax, eax
mov dword [esp + 0x58], 0xffffffff
je 0x405dbc
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov ecx, dword [esp + 0x50]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x48
ret 0x20