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

Disassembly:
sub esp, 0x54
mov dword [esp + 0x20], 2
push ebx
push esi
push edi
push ebp
call dword [0x4ff360]
mov dword [esp + 0x40], eax
push 5
call fcn.00414640
mov dword [esp + 0x48], eax
add esp, 4
cmp dword [esp + 0x70], 0
je 0x404fc8
mov eax, dword [esp + 0x70]
mov dword [eax], 0
cmp dword [esp + 0x7c], 0
je 0x404fd9
mov eax, dword [esp + 0x7c]
mov dword [eax], 0
mov esi, dword [esp + 0x80]
test esi, esi
je 0x404fe7
mov byte [esi], 0
xor ecx, ecx
cmp dword [esp + 0x68], ecx
je 0x4053eb
cmp dword [esp + 0x7c], ecx
je 0x4053eb
test esi, esi
je 0x4053eb
mov eax, dword [esp + 0x68]
cmp byte [eax], cl
je 0x4053f3
mov dword [esp + 0x34], ecx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x24], ecx
cmp dword [0x5052a8], ecx
jne 0x405053
push 0x5052a8
push 0x500e28
push 0x500e18
call fcn.00490a20
push eax
call fcn.004e6470
mov dword [esp + 0x14], eax
cmp dword [esp + 0x14], 0
jne 0x40511c
lea eax, [esp + 0x24]
mov ecx, dword [0x5052a8]
push eax
push 0x500e38
push ecx
mov eax, dword [ecx]
call dword [eax]
cmp dword [esp + 0x14], 0
jne 0x40511c
lea eax, [esp + 0x18]
push eax
push 0x500d38
push 0x500d28
call fcn.00490a20
push eax
call fcn.004e6470
mov dword [esp + 0x14], eax
test eax, eax
jne 0x4050b7
lea eax, [esp + 0x1c]
mov ecx, dword [esp + 0x18]
push eax
push 0x500c48
push ecx
mov eax, dword [ecx]
call dword [eax]
mov dword [esp + 0x14], eax
xor edi, edi
cmp dword [esp + 0x14], edi
jne 0x40511c
push 0x42
push 0x200
call fcn.00489930
add esp, 8
mov ebx, eax
test ebx, ebx
jne 0x4050fa
mov dword [esp + 0x34], 8
mov eax, dword [esp + 0x18]
push eax
mov ebx, dword [eax]
call dword [ebx + 8]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x18], edi
push ecx
mov eax, dword [ecx]
call dword [eax + 8]
mov dword [esp + 0x1c], edi
jmp 0x40511c
push 0x400
push ebx
call fcn.00489c00
add esp, 4
push eax
push ebx
mov eax, dword [esp + 0x24]
push 1
mov ebx, dword [eax]
push 0
push eax
call dword [ebx + 0xc]
mov dword [esp + 0x14], eax
xor ebx, ebx
cmp dword [esp + 0x34], ebx
jne 0x405354
cmp dword [esp + 0x14], ebx
jne 0x405354
cmp dword [esp + 0x18], ebx
je 0x405354
lea eax, [esp + 0x28]
push eax
push 0x500e08
push 0x500e68
call fcn.00490a20
push eax
call fcn.004e6470
test eax, eax
jne 0x405354
lea eax, [esp + 0x20]
mov ecx, dword [esp + 0x28]
push eax
push 0x500e58
push ecx
mov eax, dword [ecx]
call dword [eax]
mov dword [esp + 0x14], eax
cmp eax, ebx
jne 0x405354
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x68]
push eax
push ecx
mov eax, dword [0x5052a8]
mov ebp, dword [eax]
push edx
push eax
call dword [ebp + 0xc]
mov dword [esp + 0x14], eax
cmp eax, ebx
jne 0x405354
mov edi, dword [esp + 0x6c]
mov byte [esp + 0x13], bl
mov dword [esp + 0x38], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x3c], ebx
cmp edi, 1
sbb ebp, ebp
call fcn.004da6e0
and ebp, 0x7530
mov eax, dword [esp + 0x20]
push ebp
push eax
mov ebp, dword [eax]
call dword [ebp + 0xc]
cmp dword [esp + 0x14], ebx
jne 0x4052e0
cmp byte [esp + 0x13], bl
jne 0x4052e0
cmp byte [esi], bl
jne 0x4052e0
cmp dword [esp + 0x38], ebx
jne 0x4052e0
mov ebp, dword [esp + 0x2c]
lea eax, [esp + 0x13]
lea ecx, [esp + 0x3c]
push eax
lea edx, [esp + 0x30]
push esi
lea eax, [esp + 0x40]
push ecx
mov ecx, dword [esp + 0x2c]
push edx
push eax
push ecx
mov eax, dword [ecx]
call dword [eax + 0x10]
mov dword [esp + 0x14], eax
cmp dword [esp + 0x2c], ebp
jle 0x40522a
call fcn.004da710
cmp dword [esp + 0x24], ebx
je 0x40523a
mov eax, dword [esp + 0x24]
push eax
mov ebp, dword [eax]
call dword [ebp + 0x10]
cmp byte [esp + 0x13], bl
jne 0x4052bd
cmp dword [esp + 0x70], ebx
jne 0x40525a
cmp dword [esp + 0x2c], ebx
jg 0x4052e0
cmp dword [esp + 0x3c], ebx
jg 0x4052e0
cmp byte [esi], bl
jne 0x405294
call fcn.004d8120
test eax, eax
jne 0x4052c9
lea eax, [esp + 0x48]
push 1
push 0x100
push 0x100
push ebx
push eax
call dword [0x4ff584]
test eax, eax
je 0x405294
cmp dword [esp + 0x4c], 0x100
jne 0x405294
cmp dword [esp + 0x50], 0x1b
je 0x4052ce
test edi, edi
jle 0x4052a6
call dword [0x4ff360]
sub eax, dword [esp + 0x40]
cmp eax, edi
jg 0x4052d3
cmp byte [esi], bl
je 0x4052ae
test edi, edi
je 0x4052d8
push 4
call fcn.004d2e00
add esp, 4
call fcn.00462720
cmp dword [esp + 0x14], ebx
je 0x4051dc
jmp 0x4052e0
mov byte [esi], 1
jmp 0x4052e0
mov byte [esi], 1
jmp 0x4052e0
mov byte [esi], 1
jmp 0x4052e0
mov dword [esp + 0x34], 2
push 0
mov eax, dword [0x5052a8]
push eax
mov ebx, dword [eax]
call dword [ebx + 0x18]
call fcn.004da770
cmp dword [esp + 0x34], 0
jne 0x405354
cmp dword [esp + 0x38], 0
jne 0x405354
cmp dword [esp + 0x2c], 0
jle 0x405354
cmp byte [esp + 0x13], 0
jne 0x405315
cmp dword [esp + 0x70], 0
jne 0x405354
cmp dword [esp + 0x70], 0
je 0x40534c
mov eax, dword [esp + 0x7c]
mov ecx, dword [esp + 0x70]
mov edx, dword [esp + 0x18]
push eax
mov eax, dword [edx]
push ecx
push edx
call dword [eax + 0x10]
test eax, eax
jne 0x405354
mov eax, dword [esp + 0x70]
cmp dword [eax], 0
je 0x405354
mov eax, dword [esp + 0x7c]
cmp dword [eax], 0
je 0x405354
mov ecx, dword [esp + 0x2c]
mov dword [eax], ecx
mov dword [esp + 0x30], 0
cmp dword [esp + 0x24], 0
je 0x405365
mov eax, dword [esp + 0x24]
push eax
mov ebx, dword [eax]
call dword [ebx + 8]
cmp dword [esp + 0x18], 0
je 0x405376
mov eax, dword [esp + 0x18]
push eax
mov ebx, dword [eax]
call dword [ebx + 8]
cmp dword [esp + 0x1c], 0
je 0x405387
mov eax, dword [esp + 0x1c]
push eax
mov ebx, dword [eax]
call dword [ebx + 8]
cmp dword [esp + 0x28], 0
je 0x405398
mov eax, dword [esp + 0x28]
push eax
mov ebx, dword [eax]
call dword [ebx + 8]
cmp dword [esp + 0x20], 0
je 0x4053a9
mov eax, dword [esp + 0x20]
push eax
mov ebx, dword [eax]
call dword [ebx + 8]
cmp dword [0x5052a8], 0
je 0x4053c7
mov eax, dword [0x5052a8]
push eax
mov ebx, dword [eax]
call dword [ebx + 8]
mov dword [0x5052a8], 0
mov eax, dword [esp + 0x74]
test eax, eax
je 0x4053f3
cmp dword [esp + 0x30], 0
jne 0x4053f3
mov ecx, dword [esp + 0x78]
push ecx
push eax
mov eax, dword [esp + 0x70]
push eax
call fcn.00404f50
add esp, 0xc
jmp 0x4053f3
mov dword [esp + 0x30], 0x1f44
mov eax, dword [esp + 0x44]
push eax
call fcn.00414640
mov eax, dword [esp + 0x34]
add esp, 4
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x54
ret