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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x58216b
sub esp, 0x64
mov eax, dword [esp + 0x6c]
cmp eax, 2
jl 0x5820e1
nop
mov ecx, dword [esp + 0x68]
movzx edx, byte [ecx + 1]
movzx ebx, byte [ecx]
shl ebx, 8
or edx, ebx
cmp dx, 1
je 0x581fa8
cmp dx, 2
jne 0x581f3c
mov dword [esp], ecx
mov dword [esp + 4], eax
mov eax, dword [esp + 0x70]
mov dword [esp + 8], eax
call fcn.00582470
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x28], eax
movzx ecx, word [esp + 0xc]
mov edx, dword [esp + 0x10]
mov ebx, dword [esp + 0x14]
mov ebp, dword [esp + 0x18]
mov esi, dword [esp + 0x20]
mov dword [esp + 0x30], esi
mov edi, dword [esp + 0x24]
mov dword [esp + 0x38], edi
mov word [esp + 0x54], cx
mov dword [esp + 0x58], edx
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x60], ebp
lea ecx, [0x6ce100]
mov dword [esp], ecx
lea ecx, [esp + 0x54]
mov dword [esp + 4], ecx
call fcn.004095e0
mov eax, dword [esp + 8]
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x38]
mov ecx, eax
mov edx, dword [esp + 0x28]
lea eax, [0x786c8c]
jmp 0x58202e
mov dword [esp + 0x3c], 0
mov dword [esp + 0x40], 0
mov word [esp], dx
call fcn.004096b0
mov eax, dword [esp + 4]
lea ecx, [0x69bdc0]
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], eax
lea eax, [0x6fbef5]
mov dword [esp], eax
mov dword [esp + 4], 0x1e
lea eax, [esp + 0x3c]
mov dword [esp + 8], eax
mov dword [esp + 0xc], 1
mov dword [esp + 0x10], 1
call fcn.004cde70
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
xor eax, eax
xor ecx, ecx
xor edx, edx
jmp 0x58202e
mov dword [esp], ecx
mov dword [esp + 4], eax
mov eax, dword [esp + 0x70]
mov dword [esp + 8], eax
call fcn.00582180
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x28], eax
movzx ecx, word [esp + 0xc]
movzx edx, word [esp + 0xe]
mov ebx, dword [esp + 0x10]
mov ebp, dword [esp + 0x14]
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x20]
mov dword [esp + 0x30], edi
mov eax, dword [esp + 0x24]
mov dword [esp + 0x38], eax
mov word [esp + 0x44], cx
mov word [esp + 0x46], dx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x50], esi
lea ecx, [0x6d1a80]
mov dword [esp], ecx
lea ecx, [esp + 0x44]
mov dword [esp + 4], ecx
call fcn.004095e0
mov eax, dword [esp + 8]
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x38]
mov ecx, eax
mov edx, dword [esp + 0x28]
lea eax, [0x786c70]
test esi, esi
je 0x5820bb
mov dword [esp + 0x34], ecx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x3c], 0
mov dword [esp + 0x40], 0
je 0x582053
mov esi, dword [esi + 4]
mov dword [esp + 0x3c], esi
mov dword [esp + 0x40], edi
lea eax, [0x6f634d]
mov dword [esp], eax
mov dword [esp + 4], 0x14
lea eax, [esp + 0x3c]
mov dword [esp + 8], eax
mov dword [esp + 0xc], 1
mov dword [esp + 0x10], 1
call fcn.004cde70
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x74], edx
mov edx, dword [esp + 0x34]
mov dword [esp + 0x78], edx
mov dword [esp + 0x7c], 0
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], ecx
add esp, 0x64
ret
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], ecx
mov dword [esp + 0x7c], edx
mov dword [esp + 0x80], 0
mov dword [esp + 0x84], 0
add esp, 0x64
ret
mov dword [esp + 0x3c], 0
mov dword [esp + 0x40], 0
mov dword [esp], eax
call fcn.00409720
mov eax, dword [esp + 4]
lea ecx, [0x69b600]
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], eax
lea eax, [0x70228b]
mov dword [esp], eax
mov dword [esp + 4], 0x31
lea eax, [esp + 0x3c]
mov dword [esp + 8], eax
mov dword [esp + 0xc], 1
mov dword [esp + 0x10], 1
call fcn.004cde70
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x74], 0
mov dword [esp + 0x78], 0
mov dword [esp + 0x7c], 0
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], ecx
add esp, 0x64
ret
call fcn.004649b0
jmp fcn.00581e70