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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x420a40
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x58
mov eax, dword [ebp + 0x14]
mov edx, dword [eax + 0x10]
test dh, 0x40
push ebx
push esi
push edi
mov dword [esp + 0x1c], ecx
jne 0x409d70
movzx esi, byte [ebp + 0x1c]
mov edx, dword [ecx]
push esi
mov esi, dword [ebp + 0x18]
push esi
mov esi, dword [ebp + 8]
push eax
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp + 0xc]
push eax
push esi
call dword [edx + 0x1c]
jmp 0x409f32
lea ecx, [esp + 0x10]
push ecx
mov ecx, eax
call fcn.00407140
push eax
mov dword [esp + 0x70], 0
call fcn.0040a060
mov esi, dword [esp + 0x14]
add esp, 4
test esi, esi
mov edi, eax
mov dword [esp + 0x6c], 0xffffffff
mov ebx, 1
je 0x409de0
push 0
lea ecx, [esp + 0x18]
call fcn.004139bc
mov eax, dword [esi + 4]
test eax, eax
jbe 0x409dbf
cmp eax, 0xffffffff
jae 0x409dbf
dec eax
mov dword [esi + 4], eax
mov ecx, dword [esi + 4]
xor edx, edx
test ecx, ecx
setne dl
lea ecx, [esp + 0x14]
dec edx
and esi, edx
call fcn.004139df
test esi, esi
je 0x409de0
mov eax, dword [esi]
push ebx
mov ecx, esi
call dword [eax]
mov dword [esp + 0x40], 0xf
mov dword [esp + 0x3c], 0
mov byte [esp + 0x2c], 0
mov al, byte [ebp + 0x1c]
test al, al
mov dword [esp + 0x6c], ebx
je 0x409e31
lea ecx, [esp + 0x44]
push ecx
mov ecx, edi
call fcn.0040a040
push 0xffffffffffffffff
push 0
push eax
lea ecx, [esp + 0x34]
mov byte [esp + 0x78], 2
call fcn.00401e70
cmp dword [esp + 0x5c], 0x10
mov byte [esp + 0x6c], bl
jb 0x409e68
mov edx, dword [esp + 0x48]
push edx
jmp 0x409e60
lea eax, [esp + 0x44]
push eax
mov ecx, edi
call fcn.0040a020
push 0xffffffffffffffff
push 0
push eax
lea ecx, [esp + 0x34]
mov byte [esp + 0x78], 3
call fcn.00401e70
cmp dword [esp + 0x5c], 0x10
mov byte [esp + 0x6c], bl
jb 0x409e68
mov ecx, dword [esp + 0x48]
push ecx
call fcn.00414aa3
add esp, 4
mov ebx, dword [ebp + 0x14]
mov eax, dword [ebx + 0x18]
test eax, eax
mov edx, dword [esp + 0x3c]
jle 0x409e80
cmp eax, edx
jbe 0x409e80
sub eax, edx
mov esi, eax
jmp 0x409e82
xor esi, esi
mov eax, dword [ebx + 0x10]
mov ecx, dword [ebp + 0xc]
and eax, 0x1c0
cmp eax, 0x40
mov eax, dword [ebp + 0x10]
je 0x409ebf
test esi, esi
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], eax
jbe 0x409eb5
mov ecx, dword [ebp + 0x18]
push ecx
lea ecx, [esp + 0x18]
call fcn.00409f50
dec esi
jne 0x409ea1
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
xor esi, esi
cmp dword [esp + 0x40], 0x10
mov edi, dword [esp + 0x2c]
jae 0x409ece
lea edi, [esp + 0x2c]
test edx, edx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], eax
jbe 0x409ef5
mov ebx, edx
lea esp, [esp]
xor edx, edx
mov dl, byte [edi]
lea ecx, [esp + 0x20]
push edx
call fcn.00409f50
inc edi
dec ebx
jne 0x409ee0
mov ebx, dword [ebp + 0x14]
mov eax, dword [ebp + 0x18]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
push esi
mov esi, dword [ebp + 8]
push eax
mov eax, dword [esp + 0x24]
push ecx
push edx
push esi
push eax
mov dword [ebx + 0x18], 0
call fcn.00409fb0
mov eax, dword [esp + 0x58]
add esp, 0x18
cmp eax, 0x10
jb 0x409f32
mov ecx, dword [esp + 0x2c]
push ecx
call fcn.00414aa3
add esp, 4
mov ecx, dword [esp + 0x64]
pop edi
mov eax, esi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0x18