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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x582a7e
sub esp, 0x64
mov eax, dword [esp + 0x6c]
cmp eax, 2
jl 0x5829f4
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 0x5828c5
cmp dx, 2
jne 0x58285c
mov dword [esp], ecx
mov dword [esp + 4], eax
mov eax, dword [esp + 0x70]
mov dword [esp + 8], eax
call fcn.00582d40
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, [0x6ce240]
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, [0x786cc4]
jmp 0x582941
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, [0x6fbf13]
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 0x582941
mov dword [esp], ecx
mov dword [esp + 4], eax
mov eax, dword [esp + 0x70]
mov dword [esp + 8], eax
call fcn.00582a90
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 + 0x44], cx
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x50], ebp
lea ecx, [0x6ce1a0]
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, [0x786ca8]
test esi, esi
je 0x5829ce
mov dword [esp + 0x34], ecx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x3c], 0
mov dword [esp + 0x40], 0
je 0x582966
mov esi, dword [esi + 4]
mov dword [esp + 0x3c], esi
mov dword [esp + 0x40], edi
lea eax, [0x6f6361]
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, [0x7022bc]
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.00582790