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

Disassembly:
sub esp, 0x58
mov eax, dword [0x43c580]
xor eax, esp
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x60]
push ebx
mov ebx, dword [esp + 0x88]
mov dword [esp + 0x24], eax
push ebp
mov ebp, dword [esp + 0x74]
push esi
push edi
mov edi, dword [esp + 0x84]
test ebx, ebx
je 0x40a516
mov al, byte [edi]
cmp al, 0x2b
je 0x40a511
cmp al, 0x2d
jne 0x40a516
xor esi, esi
inc esi
jmp 0x40a518
xor esi, esi
mov eax, dword [ebp + 0x14]
mov ecx, 0x3000
and eax, ecx
cmp eax, ecx
je 0x40a52d
mov edx, 0x432a28
jmp 0x40a54f
lea eax, [esi + 2]
mov edx, 0x432a2c
cmp eax, ebx
ja 0x40a54f
cmp byte [edi + esi], 0x30
jne 0x40a54f
mov cl, byte [edi + esi + 1]
cmp cl, 0x78
je 0x40a54d
cmp cl, 0x58
jne 0x40a54f
mov esi, eax
push edx
push edi
call fcn.00417fd0
mov dword [esp + 0x24], eax
push 0x2e
pop eax
mov word [esp + 0x20], ax
call fcn.0041854f
mov eax, dword [eax]
mov al, byte [eax]
mov byte [esp + 0x20], al
lea eax, [esp + 0x20]
push eax
push edi
call fcn.00417fd0
mov ecx, dword [ebp + 0x30]
add esp, 0x10
mov dword [esp + 0x20], eax
mov ecx, dword [ecx]
mov dword [esp + 0x10], ecx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [esp + 0x10]
push eax
call fcn.0040250f
pop ecx
lea ecx, [esp + 0x10]
mov dword [esp + 0x14], eax
call fcn.00403029
mov ecx, dword [esp + 0x14]
push 0x30
mov eax, dword [ecx]
call dword [eax + 0x20]
mov byte [esp + 0x10], al
lea ecx, [esp + 0x34]
xor eax, eax
mov dword [esp + 0x48], 0xf
push eax
push ebx
mov dword [esp + 0x4c], eax
mov byte [esp + 0x3c], al
call fcn.0040badc
cmp dword [esp + 0x48], 0x10
mov eax, dword [esp + 0x34]
jae 0x40a5e2
lea eax, [esp + 0x34]
mov ecx, dword [esp + 0x14]
push eax
lea eax, [ebx + edi]
push eax
mov edx, dword [ecx]
push edi
call dword [edx + 0x1c]
mov ecx, dword [ebp + 0x30]
mov ecx, dword [ecx]
mov dword [esp + 0x14], ecx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [esp + 0x14]
push eax
call fcn.00402605
pop ecx
mov edi, eax
lea ecx, [esp + 0x14]
mov dword [esp + 0x28], edi
call fcn.00403029
mov eax, dword [edi]
lea ecx, [esp + 0x4c]
push ecx
mov ecx, edi
call dword [eax + 0x14]
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x10]
mov edi, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
mov byte [esp + 0x14], al
push dword [esp + 0x10]
cmp edi, ebx
jne 0x40a64e
mov eax, dword [esp + 0x8c]
push eax
push ecx
lea ebx, [ecx + eax]
jmp 0x40a6a9
push dword [esp + 0x94]
mov ebx, dword [esp + 0x90]
push ecx
lea ecx, [esp + 0x40]
add ebx, edi
call fcn.0040ee28
push dword [esp + 0x10]
lea eax, [edi + 1]
push dword [esp + 0x90]
lea ecx, [esp + 0x3c]
push eax
call fcn.0040ee28
mov ecx, dword [esp + 0x28]
mov eax, dword [ecx]
call dword [eax + 0xc]
cmp dword [esp + 0x48], 0x10
mov cl, al
mov eax, dword [esp + 0x34]
jae 0x40a69a
lea eax, [esp + 0x34]
push dword [esp + 0x10]
mov byte [eax + edi], cl
push dword [esp + 0x8c]
push edi
lea ecx, [esp + 0x40]
call fcn.0040ee28
cmp dword [esp + 0x60], 0x10
mov edi, dword [esp + 0x4c]
jae 0x40a6ee
lea edi, [esp + 0x4c]
jmp 0x40a6ee
test al, al
jle 0x40a6f4
movsx ecx, al
mov eax, ebx
sub eax, esi
cmp ecx, eax
jae 0x40a6f4
push dword [esp + 0x14]
sub ebx, ecx
lea ecx, [esp + 0x38]
push 1
push ebx
call fcn.0040ee28
lea eax, [edi + 1]
cmp byte [eax], 0
jle 0x40a6ee
mov edi, eax
mov al, byte [edi]
cmp al, 0x7f
jne 0x40a6c3
cmp dword [ebp + 0x24], 0
mov eax, dword [esp + 0x44]
mov dword [esp + 0x28], eax
jl 0x40a715
jg 0x40a70a
cmp dword [ebp + 0x20], 0
jbe 0x40a715
mov edi, dword [ebp + 0x20]
cmp edi, eax
jbe 0x40a715
sub edi, eax
jmp 0x40a717
xor edi, edi
mov eax, dword [ebp + 0x14]
and eax, 0x1c0
cmp eax, 0x40
je 0x40a7e5
cmp eax, 0x100
je 0x40a783
mov ebx, dword [esp + 0x6c]
lea eax, [esp + 0x20]
push edi
push dword [esp + 0x84]
push dword [esp + 0x80]
push dword [esp + 0x80]
push eax
push ebx
call fcn.0040b4d5
mov ecx, eax
add esp, 0x18
xor edi, edi
cmp dword [esp + 0x48], 0x10
mov eax, dword [ecx]
mov dword [esp + 0x74], eax
mov eax, dword [ecx + 4]
mov dword [esp + 0x78], eax
mov eax, dword [esp + 0x34]
jae 0x40a777
lea eax, [esp + 0x34]
push esi
push eax
push dword [ecx + 4]
push dword [ecx]
jmp 0x40a808
cmp dword [esp + 0x48], 0x10
mov eax, dword [esp + 0x34]
jae 0x40a792
lea eax, [esp + 0x34]
mov ebx, dword [esp + 0x6c]
push esi
push eax
push dword [esp + 0x80]
lea eax, [esp + 0x2c]
push dword [esp + 0x80]
push eax
push ebx
call fcn.0040b41e
mov ecx, eax
push edi
push dword [esp + 0x9c]
mov eax, dword [ecx]
mov dword [esp + 0x94], eax
mov eax, dword [ecx + 4]
mov dword [esp + 0x98], eax
lea eax, [esp + 0x40]
push dword [ecx + 4]
push dword [ecx]
push eax
push ebx
call fcn.0040b4d5
add esp, 0x30
xor edi, edi
jmp 0x40a816
cmp dword [esp + 0x48], 0x10
mov eax, dword [esp + 0x34]
jae 0x40a7f4
lea eax, [esp + 0x34]
mov ebx, dword [esp + 0x6c]
push esi
push eax
push dword [esp + 0x80]
push dword [esp + 0x80]
lea eax, [esp + 0x30]
push eax
push ebx
call fcn.0040b41e
add esp, 0x18
cmp dword [esp + 0x48], 0x10
mov ecx, dword [eax]
mov dword [esp + 0x74], ecx
mov edx, dword [eax + 4]
mov eax, dword [esp + 0x34]
mov dword [esp + 0x78], edx
jae 0x40a832
lea eax, [esp + 0x34]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x28]
sub eax, esi
push eax
mov eax, dword [esp + 0x20]
add eax, esi
push eax
push edx
push ecx
lea eax, [esp + 0x38]
push eax
push ebx
call fcn.0040b41e
mov esi, dword [esp + 0x48]
push edi
push dword [esp + 0x9c]
mov ecx, dword [eax]
mov dword [esp + 0x94], ecx
mov eax, dword [eax + 4]
and dword [ebp + 0x20], 0
and dword [ebp + 0x24], 0
push eax
push ecx
push esi
push ebx
mov dword [esp + 0xa8], eax
call fcn.0040b4d5
add esp, 0x30
lea ecx, [esp + 0x4c]
push 0
push 1
call fcn.0040b5eb
push 0
push 1
lea ecx, [esp + 0x3c]
call fcn.0040b5eb
mov ecx, dword [esp + 0x64]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004189a5
add esp, 0x58
ret