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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x420a60
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 0x409d90
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 0x409f52
lea ecx, [esp + 0x10]
push ecx
mov ecx, eax
call fcn.00407160
push eax
mov dword [esp + 0x70], 0
call fcn.0040a080
mov esi, dword [esp + 0x14]
add esp, 4
test esi, esi
mov edi, eax
mov dword [esp + 0x6c], 0xffffffff
mov ebx, 1
je 0x409e00
push 0
lea ecx, [esp + 0x18]
call fcn.004139dc
mov eax, dword [esi + 4]
test eax, eax
jbe 0x409ddf
cmp eax, 0xffffffff
jae 0x409ddf
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.004139ff
test esi, esi
je 0x409e00
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 0x409e51
lea ecx, [esp + 0x44]
push ecx
mov ecx, edi
call fcn.0040a060
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 0x409e88
mov edx, dword [esp + 0x48]
push edx
jmp 0x409e80
lea eax, [esp + 0x44]
push eax
mov ecx, edi
call fcn.0040a040
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 0x409e88
mov ecx, dword [esp + 0x48]
push ecx
call fcn.00414ac3
add esp, 4
mov ebx, dword [ebp + 0x14]
mov eax, dword [ebx + 0x18]
test eax, eax
mov edx, dword [esp + 0x3c]
jle 0x409ea0
cmp eax, edx
jbe 0x409ea0
sub eax, edx
mov esi, eax
jmp 0x409ea2
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 0x409edf
test esi, esi
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], eax
jbe 0x409ed5
mov ecx, dword [ebp + 0x18]
push ecx
lea ecx, [esp + 0x18]
call fcn.00409f70
dec esi
jne 0x409ec1
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 0x409eee
lea edi, [esp + 0x2c]
test edx, edx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], eax
jbe 0x409f15
mov ebx, edx
lea esp, [esp]
xor edx, edx
mov dl, byte [edi]
lea ecx, [esp + 0x20]
push edx
call fcn.00409f70
inc edi
dec ebx
jne 0x409f00
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.00409fd0
mov eax, dword [esp + 0x58]
add esp, 0x18
cmp eax, 0x10
jb 0x409f52
mov ecx, dword [esp + 0x2c]
push ecx
call fcn.00414ac3
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