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

Disassembly:
sub esp, 0x48
mov eax, dword [0x43c580]
xor eax, esp
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x50]
push ebx
mov ebx, dword [esp + 0x68]
push ebp
mov ebp, dword [esp + 0x64]
push esi
push edi
mov edi, dword [esp + 0x78]
mov dword [esp + 0x20], eax
test edi, edi
je 0x40afd6
mov al, byte [ebx]
cmp al, 0x2b
je 0x40afd1
cmp al, 0x2d
jne 0x40afd6
xor esi, esi
inc esi
jmp 0x40afd8
xor esi, esi
mov eax, dword [ebp + 0x14]
and eax, 0xe00
cmp eax, 0x800
jne 0x40b004
lea eax, [esi + 2]
cmp eax, edi
ja 0x40b004
cmp byte [ebx + esi], 0x30
jne 0x40b004
mov cl, byte [ebx + esi + 1]
cmp cl, 0x78
je 0x40b002
cmp cl, 0x58
jne 0x40b004
mov esi, eax
mov ecx, dword [ebp + 0x30]
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 + 0x18], eax
call fcn.00403029
xor eax, eax
mov dword [esp + 0x38], 0xf
push eax
push edi
lea ecx, [esp + 0x2c]
mov dword [esp + 0x3c], eax
mov byte [esp + 0x2c], al
call fcn.0040badc
cmp dword [esp + 0x38], 0x10
mov eax, dword [esp + 0x24]
jae 0x40b056
lea eax, [esp + 0x24]
mov ecx, dword [esp + 0x18]
push eax
lea eax, [edi + ebx]
push eax
mov edx, dword [ecx]
push ebx
call dword [edx + 0x1c]
mov ecx, dword [ebp + 0x30]
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.00402605
pop ecx
mov ebx, eax
lea ecx, [esp + 0x10]
mov dword [esp + 0x18], ebx
call fcn.00403029
mov eax, dword [ebx]
lea ecx, [esp + 0x3c]
push ecx
mov ecx, ebx
call dword [eax + 0x14]
cmp dword [esp + 0x50], 0x10
mov ebx, dword [esp + 0x3c]
jae 0x40b0a8
lea ebx, [esp + 0x3c]
mov al, byte [ebx]
cmp al, 0x7f
je 0x40b0f2
test al, al
jle 0x40b0f2
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx]
call dword [eax + 0x10]
mov byte [esp + 0x18], al
jmp 0x40b0ec
test al, al
jle 0x40b0f2
movsx ecx, al
mov eax, edi
sub eax, esi
cmp ecx, eax
jae 0x40b0f2
push dword [esp + 0x18]
sub edi, ecx
lea ecx, [esp + 0x28]
push 1
push edi
call fcn.0040ee28
lea eax, [ebx + 1]
cmp byte [eax], 0
jle 0x40b0ec
mov ebx, eax
mov al, byte [ebx]
cmp al, 0x7f
jne 0x40b0c1
cmp dword [ebp + 0x24], 0
mov eax, dword [esp + 0x34]
mov dword [esp + 0x18], eax
jl 0x40b113
jg 0x40b108
cmp dword [ebp + 0x20], 0
jbe 0x40b113
mov edi, dword [ebp + 0x20]
cmp edi, eax
jbe 0x40b113
sub edi, eax
jmp 0x40b115
xor edi, edi
mov eax, dword [ebp + 0x14]
and eax, 0x1c0
cmp eax, 0x40
je 0x40b1d1
cmp eax, 0x100
je 0x40b175
mov ebx, dword [esp + 0x5c]
lea eax, [esp + 0x10]
push edi
push dword [esp + 0x74]
push dword [esp + 0x70]
push dword [esp + 0x70]
push eax
push ebx
call fcn.0040b4d5
mov ecx, eax
add esp, 0x18
xor edi, edi
cmp dword [esp + 0x38], 0x10
mov eax, dword [ecx]
mov dword [esp + 0x64], eax
mov eax, dword [ecx + 4]
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x24]
jae 0x40b16c
lea eax, [esp + 0x24]
push esi
push eax
push dword [ecx + 4]
push dword [ecx]
jmp 0x40b1ee
cmp dword [esp + 0x38], 0x10
mov eax, dword [esp + 0x24]
jae 0x40b184
lea eax, [esp + 0x24]
mov ebx, dword [esp + 0x5c]
push esi
push eax
push dword [esp + 0x70]
lea eax, [esp + 0x1c]
push dword [esp + 0x70]
push eax
push ebx
call fcn.0040b41e
mov ecx, eax
push edi
push dword [esp + 0x8c]
mov eax, dword [ecx]
mov dword [esp + 0x84], eax
mov eax, dword [ecx + 4]
mov dword [esp + 0x88], eax
lea eax, [esp + 0x30]
push dword [ecx + 4]
push dword [ecx]
push eax
push ebx
call fcn.0040b4d5
add esp, 0x30
xor edi, edi
jmp 0x40b1fc
cmp dword [esp + 0x38], 0x10
mov eax, dword [esp + 0x24]
jae 0x40b1e0
lea eax, [esp + 0x24]
mov ebx, dword [esp + 0x5c]
push esi
push eax
push dword [esp + 0x70]
push dword [esp + 0x70]
lea eax, [esp + 0x20]
push eax
push ebx
call fcn.0040b41e
add esp, 0x18
cmp dword [esp + 0x38], 0x10
mov ecx, dword [eax]
mov dword [esp + 0x64], ecx
mov edx, dword [eax + 4]
mov eax, dword [esp + 0x24]
mov dword [esp + 0x68], edx
jae 0x40b218
lea eax, [esp + 0x24]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x18]
sub eax, esi
push eax
mov eax, dword [esp + 0x14]
add eax, esi
push eax
push edx
push ecx
lea eax, [esp + 0x28]
push eax
push ebx
call fcn.0040b41e
mov esi, dword [esp + 0x38]
push edi
push dword [esp + 0x8c]
mov ecx, dword [eax]
mov dword [esp + 0x84], 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 + 0x98], eax
call fcn.0040b4d5
add esp, 0x30
lea ecx, [esp + 0x3c]
push 0
push 1
call fcn.0040b5eb
push 0
push 1
lea ecx, [esp + 0x2c]
call fcn.0040b5eb
mov ecx, dword [esp + 0x54]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004189a5
add esp, 0x48
ret