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

Disassembly:
sub esp, 0x58
mov eax, dword [0x480600]
xor eax, esp
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x5c]
push ebx
mov ebx, dword [esp + 0x6c]
push ebp
push esi
mov esi, dword [esp + 0x7c]
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x80]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x28], ebx
mov dword [esp + 0x20], esi
mov dword [esp + 0xc], ecx
push edi
test ecx, ecx
je 0x401db7
mov al, byte [esi]
cmp al, 0x2b
je 0x401db2
cmp al, 0x2d
jne 0x401db7
xor edi, edi
inc edi
jmp 0x401db9
xor edi, edi
mov eax, dword [ebx + 0x14]
mov edx, 0x3000
and eax, edx
cmp eax, edx
je 0x401dce
mov edx, 0x42a658
jmp 0x401df0
lea eax, [edi + 2]
mov edx, 0x42a65c
cmp eax, ecx
ja 0x401df0
cmp byte [esi + edi], 0x30
jne 0x401df0
mov cl, byte [esi + edi + 1]
cmp cl, 0x78
je 0x401dee
cmp cl, 0x58
jne 0x401df0
mov edi, eax
push edx
push esi
call fcn.00412d70
mov dword [esp + 0x30], eax
push 0x2e
pop eax
mov word [esp + 0x1c], ax
call fcn.00412e87
mov eax, dword [eax]
mov al, byte [eax]
mov byte [esp + 0x1c], al
lea eax, [esp + 0x1c]
push eax
push esi
call fcn.00412d70
mov ebp, eax
add esp, 0x10
mov eax, dword [ebx + 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.0040296c
pop ecx
lea ecx, [esp + 0x18]
mov esi, eax
call fcn.0040369e
push 0
push dword [esp + 0x14]
lea ecx, [esp + 0x3c]
call fcn.00402cda
cmp dword [esp + 0x48], 7
lea eax, [esp + 0x34]
mov ecx, dword [esp + 0x24]
cmova eax, dword [esp + 0x34]
mov edx, dword [esi]
push eax
mov eax, dword [esp + 0x14]
add eax, ecx
push eax
push ecx
mov ecx, esi
call dword [edx + 0x2c]
mov eax, dword [ebx + 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.00402a5e
pop ecx
lea ecx, [esp + 0x18]
mov esi, eax
call fcn.0040369e
mov eax, dword [esi]
lea ecx, [esp + 0x4c]
push ecx
mov ecx, esi
call dword [eax + 0x14]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x10]
movzx eax, ax
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x10]
cmp ebp, eax
je 0x401edd
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0xc]
cmp dword [esp + 0x48], 7
movzx ecx, ax
lea eax, [esp + 0x34]
cmova eax, dword [esp + 0x34]
mov word [eax + ebp*2], cx
mov eax, dword [esp + 0x10]
cmp byte [esp + 0x88], 0
je 0x401f37
cmp ebp, eax
lea esi, [esp + 0x4c]
cmove ebp, dword [esp + 0x28]
cmp dword [esp + 0x60], 0xf
cmova esi, dword [esp + 0x4c]
mov al, byte [esi]
cmp al, 0x7f
je 0x401f37
mov ebx, dword [esp + 0x24]
test al, al
jle 0x401f33
movsx ecx, al
mov eax, ebp
sub eax, edi
cmp ecx, eax
jae 0x401f33
push ebx
sub ebp, ecx
lea ecx, [esp + 0x38]
push 1
push ebp
call fcn.0040680b
lea eax, [esi + 1]
cmp byte [eax], 0
cmovg esi, eax
mov al, byte [esi]
cmp al, 0x7f
jne 0x401f06
mov ebx, dword [esp + 0x2c]
cmp dword [ebx + 0x24], 0
mov eax, dword [esp + 0x44]
mov dword [esp + 0x10], eax
jl 0x401f58
jg 0x401f4d
cmp dword [ebx + 0x20], 0
jbe 0x401f58
mov esi, dword [ebx + 0x20]
cmp esi, eax
jbe 0x401f58
sub esi, eax
jmp 0x401f5a
xor esi, esi
mov eax, dword [ebx + 0x14]
mov ebp, dword [esp + 0x20]
and eax, 0x1c0
cmp eax, 0x40
je 0x40201a
cmp eax, 0x100
je 0x401fc8
push esi
push dword [esp + 0x80]
lea eax, [esp + 0x20]
push dword [esp + 0x7c]
push dword [esp + 0x7c]
push eax
push ebp
call fcn.004052dd
xor esi, esi
cmp dword [esp + 0x60], 7
push edi
mov edx, dword [eax]
mov ecx, dword [eax + 4]
lea eax, [esp + 0x50]
cmova eax, dword [esp + 0x50]
push eax
push ecx
push edx
lea eax, [esp + 0x40]
mov dword [esp + 0x98], edx
push eax
push ebp
mov dword [esp + 0xa4], ecx
call fcn.004051b1
add esp, 0x30
jmp 0x402040
cmp dword [esp + 0x48], 7
lea eax, [esp + 0x34]
push edi
cmova eax, dword [esp + 0x38]
push eax
push dword [esp + 0x7c]
lea eax, [esp + 0x24]
push dword [esp + 0x7c]
push eax
push ebp
call fcn.004051b1
push esi
push dword [esp + 0x98]
mov ecx, dword [eax]
mov eax, dword [eax + 4]
push eax
mov dword [esp + 0x98], eax
lea eax, [esp + 0x3c]
push ecx
push eax
push ebp
mov dword [esp + 0xa0], ecx
call fcn.004052dd
add esp, 0x30
xor esi, esi
jmp 0x402040
cmp dword [esp + 0x48], 7
lea eax, [esp + 0x34]
push edi
cmova eax, dword [esp + 0x38]
push eax
push dword [esp + 0x7c]
lea eax, [esp + 0x24]
push dword [esp + 0x7c]
push eax
push ebp
call fcn.004051b1
add esp, 0x18
mov edx, dword [eax + 4]
mov ecx, dword [eax]
lea eax, [esp + 0x34]
cmp dword [esp + 0x48], 7
mov dword [esp + 0x70], ecx
cmova eax, dword [esp + 0x34]
sub dword [esp + 0x10], edi
push dword [esp + 0x10]
mov dword [esp + 0x78], edx
lea eax, [eax + edi*2]
push eax
push edx
push ecx
lea eax, [esp + 0x28]
push eax
push ebp
call fcn.004051b1
push esi
push dword [esp + 0x98]
mov esi, dword [esp + 0x50]
mov ecx, dword [eax]
mov eax, dword [eax + 4]
and dword [ebx + 0x20], 0
and dword [ebx + 0x24], 0
push eax
push ecx
push esi
push ebp
mov dword [esp + 0xa0], ecx
mov dword [esp + 0xa4], eax
call fcn.004052dd
add esp, 0x30
lea ecx, [esp + 0x4c]
call fcn.004058fc
lea ecx, [esp + 0x34]
call fcn.00405922
mov ecx, dword [esp + 0x64]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040b778
add esp, 0x58
ret 0x20