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

Disassembly:
sub esp, 0x54
mov eax, dword [0x4855c0]
xor eax, esp
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x58]
push ebx
mov ebx, dword [esp + 0x70]
push ebp
mov ebp, dword [esp + 0x6c]
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x78]
mov dword [esp + 0x24], eax
mov dword [esp + 0x1c], ebx
mov dword [esp + 8], ecx
push esi
push edi
test ecx, ecx
je 0x401dde
mov al, byte [ebx]
cmp al, 0x2b
je 0x401dd9
cmp al, 0x2d
jne 0x401dde
xor edi, edi
inc edi
jmp 0x401de0
xor edi, edi
mov eax, dword [ebp + 0x14]
mov edx, 0x3000
and eax, edx
cmp eax, edx
je 0x401df5
mov edx, 0x42c718
jmp 0x401e17
lea eax, [edi + 2]
mov edx, 0x42c71c
cmp eax, ecx
ja 0x401e17
cmp byte [ebx + edi], 0x30
jne 0x401e17
mov cl, byte [ebx + edi + 1]
cmp cl, 0x78
je 0x401e15
cmp cl, 0x58
jne 0x401e17
mov edi, eax
push edx
push ebx
call fcn.00414da0
mov dword [esp + 0x30], eax
push 0x2e
pop eax
mov word [esp + 0x1c], ax
call fcn.00414eb7
mov eax, dword [eax]
mov al, byte [eax]
mov byte [esp + 0x1c], al
lea eax, [esp + 0x1c]
push eax
push ebx
call fcn.00414da0
mov ebx, eax
add esp, 0x10
mov eax, dword [ebp + 0x30]
mov ecx, dword [eax + 4]
mov dword [esp + 0x1c], ecx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [esp + 0x18]
push eax
call fcn.00402c41
pop ecx
lea ecx, [esp + 0x18]
mov esi, eax
call fcn.00403aee
push 0
push dword [esp + 0x14]
lea ecx, [esp + 0x38]
call fcn.004030c1
cmp dword [esp + 0x44], 0xf
lea eax, [esp + 0x30]
mov ecx, dword [esp + 0x24]
cmova eax, dword [esp + 0x30]
mov edx, dword [esi]
push eax
mov eax, dword [esp + 0x14]
add eax, ecx
push eax
push ecx
mov ecx, esi
call dword [edx + 0x1c]
mov eax, dword [ebp + 0x30]
mov ecx, dword [eax + 4]
mov dword [esp + 0x1c], ecx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [esp + 0x18]
push eax
call fcn.00402e25
pop ecx
lea ecx, [esp + 0x18]
mov esi, eax
call fcn.00403aee
mov eax, dword [esi]
lea ecx, [esp + 0x48]
push ecx
mov ecx, esi
call dword [eax + 0x14]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x10]
mov byte [esp + 0x24], al
mov eax, dword [esp + 0x10]
cmp ebx, eax
je 0x401eff
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0xc]
cmp dword [esp + 0x44], 0xf
mov cl, al
lea eax, [esp + 0x30]
cmova eax, dword [esp + 0x30]
mov byte [eax + ebx], cl
mov eax, dword [esp + 0x10]
cmp byte [esp + 0x84], 0
je 0x401f50
cmp ebx, eax
lea esi, [esp + 0x48]
cmove ebx, dword [esp + 0x28]
cmp dword [esp + 0x5c], 0xf
cmova esi, dword [esp + 0x48]
jmp 0x401f4a
test al, al
jle 0x401f50
movsx ecx, al
mov eax, ebx
sub eax, edi
cmp ecx, eax
jae 0x401f50
push dword [esp + 0x24]
sub ebx, ecx
lea ecx, [esp + 0x34]
push 1
push ebx
call fcn.00407a88
lea eax, [esi + 1]
cmp byte [eax], 0
cmovg esi, eax
mov al, byte [esi]
cmp al, 0x7f
jne 0x401f20
cmp dword [ebp + 0x24], 0
mov eax, dword [esp + 0x40]
mov dword [esp + 0x10], eax
jl 0x401f71
jg 0x401f66
cmp dword [ebp + 0x20], 0
jbe 0x401f71
mov esi, dword [ebp + 0x20]
cmp esi, eax
jbe 0x401f71
sub esi, eax
jmp 0x401f73
xor esi, esi
mov eax, dword [ebp + 0x14]
mov ebx, dword [esp + 0x20]
and eax, 0x1c0
cmp eax, 0x40
je 0x402030
cmp eax, 0x100
je 0x401fde
push esi
push dword [esp + 0x7c]
lea eax, [esp + 0x20]
push dword [esp + 0x78]
push dword [esp + 0x78]
push eax
push ebx
call fcn.00405d5c
xor esi, esi
cmp dword [esp + 0x5c], 0xf
push edi
mov edx, dword [eax]
mov ecx, dword [eax + 4]
lea eax, [esp + 0x4c]
cmova eax, dword [esp + 0x4c]
push eax
push ecx
push edx
lea eax, [esp + 0x40]
mov dword [esp + 0x94], edx
push eax
push ebx
mov dword [esp + 0xa0], ecx
call fcn.00405bfd
add esp, 0x30
jmp 0x402056
cmp dword [esp + 0x44], 0xf
lea eax, [esp + 0x30]
push edi
cmova eax, dword [esp + 0x34]
push eax
push dword [esp + 0x78]
lea eax, [esp + 0x24]
push dword [esp + 0x78]
push eax
push ebx
call fcn.00405bfd
push esi
push dword [esp + 0x94]
mov ecx, dword [eax]
mov eax, dword [eax + 4]
push eax
mov dword [esp + 0x94], eax
lea eax, [esp + 0x3c]
push ecx
push eax
push ebx
mov dword [esp + 0x9c], ecx
call fcn.00405d5c
add esp, 0x30
xor esi, esi
jmp 0x402056
cmp dword [esp + 0x44], 0xf
lea eax, [esp + 0x30]
push edi
cmova eax, dword [esp + 0x34]
push eax
push dword [esp + 0x78]
lea eax, [esp + 0x24]
push dword [esp + 0x78]
push eax
push ebx
call fcn.00405bfd
add esp, 0x18
mov edx, dword [eax + 4]
mov ecx, dword [eax]
lea eax, [esp + 0x30]
cmp dword [esp + 0x44], 0xf
mov dword [esp + 0x6c], ecx
cmova eax, dword [esp + 0x30]
sub dword [esp + 0x10], edi
add eax, edi
push dword [esp + 0x10]
mov dword [esp + 0x74], edx
push eax
push edx
push ecx
lea eax, [esp + 0x28]
push eax
push ebx
call fcn.00405bfd
push esi
push dword [esp + 0x94]
mov esi, dword [esp + 0x4c]
mov ecx, dword [eax]
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 + 0x9c], ecx
mov dword [esp + 0xa0], eax
call fcn.00405d5c
add esp, 0x30
lea ecx, [esp + 0x48]
call fcn.00406384
lea ecx, [esp + 0x30]
call fcn.00406384
mov ecx, dword [esp + 0x60]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040cc34
add esp, 0x54
ret 0x20