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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x504387
sub esp, 0x54
mov eax, dword [esp + 0x64]
cmp eax, 4
jne 0x50431d
mov ecx, dword [esp + 0x60]
cmp dword [ecx], 0x78696e75
jne 0x5042ea
mov edx, 1
mov ebx, dword [esp + 0x7c]
cmp ebx, 4
jne 0x5042aa
mov ebp, dword [esp + 0x78]
cmp dword [ebp], 0x6c616964
jne 0x50421d
mov dword [esp + 0x44], edx
mov ebx, dword [esp + 0x68]
test ebx, ebx
jne 0x5041de
mov ebp, dword [esp + 0x6c]
mov esi, dword [esp + 0x70]
test esi, esi
jne 0x504187
mov edi, dword [esp + 0x74]
test esi, esi
je 0x50414f
mov dword [esp + 0x74], edi
mov edi, dword [esp + 0x58]
mov dword [esp], edi
mov edi, dword [esp + 0x5c]
mov dword [esp + 4], edi
mov dword [esp + 8], ecx
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], 1
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], 0
mov byte [esp + 0x1c], 0
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebp
mov dword [esp + 0x28], esi
mov eax, dword [esp + 0x74]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x80]
mov dword [esp + 0x30], eax
call fcn.00500b80
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x38]
mov ebx, dword [esp + 0x3c]
test ecx, ecx
je 0x50412e
mov dword [esp + 0x84], 0
mov dword [esp + 0x88], edx
mov dword [esp + 0x8c], ebx
add esp, 0x54
ret
mov dword [esp + 0x84], eax
mov dword [esp + 0x88], 0
mov dword [esp + 0x8c], 0
add esp, 0x54
ret
cmp edx, 2
je 0x50417d
mov eax, dword [0x752c48]
mov ecx, dword [0x752c4c]
mov dword [esp + 0x84], 0
mov dword [esp + 0x88], eax
mov dword [esp + 0x8c], ecx
add esp, 0x54
ret
test ebx, ebx
jne 0x5040a5
jmp 0x504154
mov dword [esp + 0x48], ebx
mov dword [esp + 0x50], ebp
mov eax, dword [esi + 0x1c]
mov ecx, dword [esp + 0x74]
mov dword [esp], ecx
call eax
movzx eax, byte [esp + 4]
test al, al
je 0x5041c1
mov eax, dword [esp + 0x64]
mov ecx, dword [esp + 0x60]
mov edx, dword [esp + 0x44]
mov ebx, dword [esp + 0x48]
mov ebp, dword [esp + 0x50]
xor esi, esi
xor edi, edi
jmp 0x50409d
mov eax, dword [esp + 0x64]
mov ecx, dword [esp + 0x60]
mov edx, dword [esp + 0x44]
mov ebx, dword [esp + 0x48]
mov ebp, dword [esp + 0x50]
mov esi, dword [esp + 0x70]
jmp 0x504099
mov eax, dword [ebx + 0x1c]
mov ecx, dword [esp + 0x6c]
mov dword [esp], ecx
call eax
movzx eax, byte [esp + 4]
test al, al
je 0x504208
mov eax, dword [esp + 0x64]
mov ecx, dword [esp + 0x60]
mov edx, dword [esp + 0x44]
xor ebx, ebx
xor ebp, ebp
jmp 0x50408d
mov eax, dword [esp + 0x64]
mov ecx, dword [esp + 0x60]
mov edx, dword [esp + 0x44]
mov ebx, dword [esp + 0x68]
jmp 0x504089
mov dword [esp], 0
lea eax, [0x5ee606]
mov dword [esp + 4], eax
mov dword [esp + 8], 0xe
mov dword [esp + 0xc], ebp
mov dword [esp + 0x10], ebx
call fcn.00448400
mov eax, dword [esp + 0x14]
mov dword [esp + 0x4c], eax
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x40], ecx
lea edx, [0x5c5ee0]
mov dword [esp], edx
call fcn.0040b8e0
mov edi, dword [esp + 4]
mov eax, dword [esp + 0x40]
mov dword [edi + 4], eax
mov eax, dword [0x770e60]
test eax, eax
jne 0x50429f
mov eax, dword [esp + 0x4c]
mov dword [edi], eax
mov dword [esp + 0x84], 0
lea eax, [0x639f68]
mov dword [esp + 0x88], eax
mov dword [esp + 0x8c], edi
add esp, 0x54
ret
mov eax, dword [esp + 0x4c]
call fcn.0045df70
jmp 0x50427c
cmp ebx, 6
jne 0x5042e1
mov ebp, dword [esp + 0x78]
cmp dword [ebp], 0x7473696c
jne 0x50421d
cmp word [ebp + 4], 0x6e65
jne 0x50421d
mov esi, dword [esp + 0x70]
mov ebx, dword [esp + 0x68]
mov edi, dword [esp + 0x74]
mov ebp, dword [esp + 0x6c]
jmp 0x5040a5
mov ebp, dword [esp + 0x78]
jmp 0x50421d
mov dword [esp], ecx
mov dword [esp + 4], eax
call fcn.00409140
mov eax, dword [esp + 8]
mov dword [esp + 0x84], 0
lea ecx, [0x63a300]
mov dword [esp + 0x88], ecx
mov dword [esp + 0x8c], eax
add esp, 0x54
ret
cmp eax, 8
jne 0x504341
mov ecx, dword [esp + 0x60]
cmp dword [ecx], 0x78696e75
jne 0x5042ea
cmp dword [ecx + 4], 0x6d617267
jne 0x5042ea
mov edx, 2
jmp 0x50405b
cmp eax, 0xa
je 0x50434c
mov ecx, dword [esp + 0x60]
jmp 0x5042ea
mov ecx, dword [esp + 0x60]
mov dword [esp], ecx
lea edx, [0x5ece63]
mov dword [esp + 4], edx
mov dword [esp + 8], eax
call fcn.00402890
movzx eax, byte [esp + 0xc]
test al, al
je 0x504381
mov eax, dword [esp + 0x64]
mov ecx, dword [esp + 0x60]
mov edx, 5
jmp 0x50405b
mov eax, dword [esp + 0x64]
jmp 0x504346
call fcn.0045ca10
jmp fcn.00504020