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

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0xf8c
test eax, eax
push ebp
mov ebp, ecx
je 0x401f39
mov eax, dword [ebp + 0x1c]
push eax
call dword [0x4460cc]
push ebx
push esi
push edi
mov edx, dword [ebp + 0x28]
xor ebx, ebx
cmp edx, ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x10], ebx
je 0x40258a
mov eax, dword [esp + 0x10]
mov edi, 0xffffffe0
xor ecx, ecx
sub edi, edx
lea esi, [eax*4]
lea eax, [edx + 0x20]
mov dword [esp + 0x20], edi
mov edi, dword [eax]
test edi, edi
je 0x401f94
test ebx, ebx
je 0x401f82
mov ebx, dword [esi + ebx + 0x20]
mov edi, dword [edi + 0xc]
cmp edi, dword [ebx + 0xc]
jae 0x401f90
mov esi, dword [esp + 0x20]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x10], ecx
add esi, eax
mov ebx, dword [esp + 0x1c]
inc ecx
add eax, 4
cmp ecx, 2
jl 0x401f6c
mov edx, dword [edx]
test edx, edx
jne 0x401f51
test ebx, ebx
je 0x40258a
cmp dword [esp + 0x10], 1
jne 0x401fbe
mov eax, dword [ebx + 0x20]
mov ecx, dword [ebx + 0x24]
mov dword [ebx + 0x20], ecx
mov dword [ebx + 0x24], eax
mov edx, dword [ebx + 0x2c]
mov edi, dword [ebx + 0x20]
xor eax, eax
cmp edx, 2
sete al
xor edx, edx
mov dword [ebp + 0x24], eax
test eax, eax
mov eax, dword [ebp + 0x1c]
mov dword [esp + 0x10], edi
setne dl
inc edx
push edx
push eax
call dword [0x446020]
mov eax, dword [esp + 0xfa0]
test eax, eax
jne 0x401ffb
mov ecx, dword [ebp + 0x1c]
push ecx
call dword [0x4460cc]
lea edx, [esp + 0x24]
push edx
call 0x3fa5fe
add esp, 4
mov esi, ebx
mov eax, dword [esi + 8]
mov ecx, dword [esi + 4]
mov edx, dword [ebp + 0x1c]
push 0
push eax
push ecx
push edx
call dword [0x446080]
test esi, esi
je 0x40207b
lea eax, [esp + 0x24]
lea edi, [esi + 4]
push eax
push edi
call 0x3fa84e
lea ecx, [esp + 0x2c]
lea edx, [esi + 0xc]
push ecx
push edx
call 0x3fa84e
lea eax, [esp + 0x34]
lea ebx, [esi + 0x14]
push eax
push ebx
call 0x3fa84e
mov ecx, dword [ebp + 0x1c]
push edi
push ecx
call fcn.00401ece
mov edx, dword [esp + 0x30]
add esp, 0x20
mov ecx, ebp
mov dword [esi + 0x20], 0
push ebx
push edx
call fcn.00401dee
mov esi, eax
test esi, esi
jne 0x402022
mov edi, dword [esp + 0x10]
mov ebx, dword [esp + 0x1c]
push 0
push edi
mov ecx, ebp
call fcn.00401dee
mov esi, eax
test esi, esi
jne 0x40200a
mov eax, dword [esp + 0xfa0]
test eax, eax
jne 0x401f3c
mov eax, dword [ebp + 0x1c]
push eax
call dword [0x446050]
mov al, byte [edi + 0x14]
test al, al
je 0x4020b9
cmp word [edi + 0x26], si
je 0x401f3c
mov ecx, dword [edi + 0x20]
mov edx, dword [edi + 0x24]
lea eax, [esp + 0x14]
mov dword [esp + 0x14], ecx
push eax
mov dword [esp + 0x1c], edx
call fcn.00401d2e
mov eax, dword [ebx + 0x28]
xor ebx, ebx
add esp, 4
cmp eax, ebx
je 0x402150
mov edx, dword [esp + 0x16]
xor ecx, ecx
mov ch, byte [esp + 0x14]
and edx, 0xff
or ecx, edx
mov edx, dword [esp + 0x18]
shl ecx, 8
and edx, 0xff
push ebx
or ecx, edx
push ebx
mov dword [esp + 0xcc], ecx
lea ecx, [esp + 0xc8]
push ecx
push eax
push 0x10000
mov dword [esp + 0xd4], ebx
call dword [0x446028]
mov edx, dword [ebp + 0x1c]
mov ebx, dword [0x446030]
mov esi, eax
push esi
push edx
call ebx
mov edi, eax
mov eax, dword [ebp + 0x1c]
push eax
call dword [0x446024]
mov ecx, dword [ebp + 0x1c]
push edi
push ecx
call ebx
push esi
call dword [0x44602c]
jmp 0x401f3c
mov al, byte [edi + 0x16]
test al, al
jne 0x4021ac
mov eax, dword [esp + 0x16]
mov ecx, dword [esp + 0x18]
xor edx, edx
and eax, 0xff
mov dh, byte [esp + 0x14]
and ecx, 0xff
or edx, eax
shl edx, 8
or edx, ecx
push edx
call dword [0x4460f4]
mov edx, dword [ebp + 0x1c]
mov ebx, dword [0x446030]
mov esi, eax
push esi
push edx
call ebx
mov edi, eax
mov eax, dword [ebp + 0x1c]
push eax
call dword [0x4460dc]
mov ecx, dword [ebp + 0x1c]
push edi
push ecx
call ebx
push esi
call dword [0x44602c]
jmp 0x401f3c
mov edx, dword [ebp + 0x1c]
push edx
call dword [fcn.004460ec]
mov dword [esp + 0x20], eax
mov eax, dword [ebp + 0x1c]
push 1
push eax
call dword [0x4460e0]
lea ecx, [esp + 0xcc]
call 0x3f217e
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
sub ecx, eax
sar ecx, 2
push 1
push ecx
mov ecx, dword [esp + 0x2c]
sub edx, ecx
lea ecx, [esp + 0xd4]
sar edx, 2
push edx
push ebx
push 0x18
call 0x3f292e
cmp dword [esp + 0xd8], ebx
je 0x40256a
lea ecx, [esp + 0x1b4]
call fcn.0040471e
push 1
lea eax, [esp + 0xd0]
push ebx
push eax
lea ecx, [esp + 0x1c0]
call fcn.0040486e
lea ecx, [esp + 0x1b4]
call fcn.0040499e
lea ecx, [esp + 0x1b4]
push ecx
lea ecx, [esp + 0x10c]
call fcn.0040333e
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
mov dword [esp + 0x12c], eax
mov al, byte [edi + 0x16]
cmp al, 2
mov dword [esp + 0x114], ebx
mov dword [esp + 0x128], edx
jne 0x402294
lea esi, [edi + 0x30]
mov ecx, 0x19
lea edi, [esp + 0x138]
mov byte [esp + 0x11e], al
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0x198], ebx
jmp 0x4022b0
cmp al, 1
jne 0x4022b0
lea esi, [edi + 0x30]
mov ecx, 0x1f
lea edi, [esp + 0x138]
mov byte [esp + 0x11e], al
rep movsd dword es:[edi], dword [esi]
lea esi, [ebp + 4]
mov ecx, 6
lea edi, [esp + 0x44]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x24]
mov edi, dword [esp + 0x2c]
mov esi, dword [esp + 0x44]
mov edx, dword [esp + 0x48]
sub eax, ecx
mov ecx, dword [esp + 0x58]
sub ecx, edi
mov edi, dword [esp + 0x4c]
sar ecx, 2
sar esi, 2
mov dword [esp + 0x58], ecx
lea ecx, [esp + 0x44]
sar edx, 2
mov dword [esp + 0x44], esi
mov esi, dword [esp + 0x50]
mov dword [esp + 0x48], edx
mov edx, dword [ebp]
push ecx
push ebx
sar edi, 2
sar esi, 2
sar eax, 2
push ebx
push edx
lea ecx, [esp + 0x2f4]
mov dword [esp + 0x5c], edi
mov dword [esp + 0x60], esi
mov dword [esp + 0x64], eax
call fcn.00412d6e
lea ecx, [esp + 0x108]
lea eax, [esp + 0x1b4]
push ecx
lea ecx, [esp + 0x2e8]
mov dword [esp + 0x360], eax
call fcn.00412ebe
lea ecx, [esp + 0x2e4]
call fcn.00412e4e
mov eax, dword [esp + 0x1e0]
mov ecx, dword [esp + 0x1e4]
lea edx, [esp + 0x9c]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x1d8]
mov dword [esp + 0x78], edx
mov dword [esp + 0x34], eax
mov dword [esp + 0x3c], eax
lea edx, [esp + 0x5c]
mov dword [esp + 0x38], ecx
lea eax, [esp + 0x34]
push edx
lea ecx, [esp + 0x40]
push eax
push ecx
mov dword [esp + 0xa8], ebx
call 0x3f2dce
mov dx, word [esp + 0x68]
mov ax, word [esp + 0x6c]
mov cx, word [esp + 0x70]
mov word [esp + 0x94], dx
mov dx, word [esp + 0x74]
mov word [esp + 0x96], ax
mov ax, word [esp + 0x78]
mov word [esp + 0x9a], dx
mov word [esp + 0x98], cx
mov cx, word [esp + 0x7c]
lea edx, [esp + 0x68]
mov word [esp + 0x9c], ax
push edx
mov word [esp + 0xa2], cx
call 0x3f2e8e
cmp eax, 1
lea ecx, [esp + 0x6c]
setle al
mov byte [esp + 0xa4], al
mov eax, dword [esp + 0x1ec]
mov dword [esp + 0x44], eax
mov dword [esp + 0x4c], eax
lea edx, [esp + 0x44]
push ecx
lea eax, [esp + 0x50]
push edx
push eax
call 0x3f2dce
mov cx, word [esp + 0x78]
mov dx, word [esp + 0x7c]
mov ax, word [esp + 0x80]
mov word [esp + 0xc8], cx
mov cx, word [esp + 0x84]
mov word [esp + 0xca], dx
mov dx, word [esp + 0x88]
mov word [esp + 0xce], cx
mov word [esp + 0xcc], ax
mov ax, word [esp + 0x8c]
lea ecx, [esp + 0x78]
mov word [esp + 0xd0], dx
push ecx
mov word [esp + 0xd6], ax
call 0x3f2e8e
add esp, 0x20
cmp eax, 1
setle dl
lea eax, [esp + 0x108]
mov byte [esp + 0xb8], dl
mov dword [esp + 0xa4], eax
lea ecx, [esp + 0x108]
lea edx, [esp + 0x108]
push ebx
lea eax, [esp + 0x7c]
mov dword [esp + 0x84], ecx
push edx
push eax
lea ecx, [esp + 0x1c0]
mov byte [esp + 0xc6], 0
mov byte [esp + 0xa2], 0
mov byte [esp + 0xc5], 1
mov byte [esp + 0xa1], 1
mov dword [esp + 0xb4], ebx
mov dword [esp + 0x90], ebx
call fcn.00404a4e
lea ecx, [esp + 0x1b4]
call fcn.0040609e
lea ecx, [esp + 0x108]
call fcn.0040336e
mov ecx, dword [esp + 0xfc]
mov edx, dword [esp + 0xd8]
mov eax, dword [esp + 0xe4]
push 0xcc0020
push ebx
push ecx
mov ecx, dword [esp + 0xec]
push edx
mov edx, dword [esp + 0x40]
push eax
mov eax, dword [esp + 0x40]
push ecx
mov ecx, dword [esp + 0x3c]
push ebx
sub edx, eax
push ebx
push edx
mov edx, dword [esp + 0x4c]
sub edx, ecx
push edx
push eax
mov eax, dword [ebp + 0x1c]
push ecx
push eax
call dword [0x446034]
lea ecx, [esp + 0x1b4]
call fcn.004047de
mov ecx, dword [esp + 0x20]
mov edx, dword [ebp + 0x1c]
push ecx
push edx
call dword [fcn.004460f0]
lea ecx, [esp + 0xcc]
call 0x3f21ae
jmp 0x401f3c
mov eax, dword [esp + 0xfa0]
pop edi
pop esi
pop ebx
test eax, eax
je 0x4025ae
mov eax, dword [ebp + 0x1c]
push eax
call dword [0x446050]
mov ecx, dword [ebp + 0x1c]
push 1
push ecx
call dword [0x4460e0]
pop ebp
add esp, 0xf8c
ret 4