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

Disassembly:
sub esp, 0xf4
push ebx
push ebp
push esi
push edi
push 0xffff
call dword [sym.imp.MSVCRT.dll_malloc]
mov esi, dword [esp + 0x110]
mov edi, eax
xor ebx, ebx
add esp, 4
mov ecx, dword [esi + 0x14]
xor eax, eax
cmp ecx, ebx
mov word [esp + 0xb0], 0x52
mov dword [esp + 0x10], eax
jbe 0x402cb2
mov ebp, dword [esp + 0x108]
jmp 0x402a2b
mov eax, dword [esp + 0x10]
mov word [edi], 0xfffd
mov ecx, dword [ebp + 0x3cc]
mov edx, dword [ebp + 0x38c]
push ecx
mov ecx, dword [esi + 0x20]
push edx
movsx edx, word [ecx + eax*2]
mov ecx, dword [esi + 0x18]
push edx
mov edx, dword [ecx + eax*4]
lea eax, [esp + 0xbe]
push edx
push 0x52
push eax
call sub.NLSRTL33.dll_Ordinal_268
mov ecx, dword [esi + 0x20]
mov edx, dword [esp + 0x28]
add esp, 0x18
mov ax, word [ecx + edx*2]
mov word [esp + 0xb0], ax
mov eax, dword [ebp + 0x384]
cmp eax, ebx
je 0x402a8e
call sub.rwlib60.dll_rstmst
mov dword [esp + 0x1c], eax
call sub.rwlib60.dll_rstmrut
mov dword [esp + 0x14], eax
lea edx, [esp + 0x70]
lea ecx, [esp + 0xb0]
mov dword [esp + 0x4c], edx
lea edx, [esp + 0x88]
mov dword [esp + 0x70], ecx
mov dword [esp + 0x58], edx
lea eax, [esp + 0x78]
lea ecx, [esp + 0x80]
lea edx, [esp + 0xa0]
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], ecx
mov dword [esp + 0x64], edx
lea eax, [esp + 0x90]
lea ecx, [esp + 0x98]
lea edx, [esp + 0x20]
push 0x40c010
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], ecx
push edx
lea eax, [esp + 0xb0]
lea ecx, [esp + 0xb4]
push 0x40d19c
push ebx
mov dword [esp + 0x30], 0xa
mov dword [esp + 0x34], 2
mov dword [esp + 0x54], 0x40d170
mov dword [esp + 0x58], 0x40d190
mov dword [esp + 0x50], 0x40e8a4
mov dword [esp + 0x38], 1
mov dword [esp + 0x3c], 0x77
mov dword [esp + 0x48], 0x40c028
mov dword [esp + 0x4c], 0x40e900
mov word [esp + 0x42], bx
mov dword [esp + 0x88], ebx
mov dword [esp + 0x90], ebx
mov dword [esp + 0x98], ebx
mov dword [esp + 0xa0], ebx
mov dword [esp + 0xa8], ebx
mov word [esp + 0xb8], bx
mov word [esp + 0xbc], bx
mov dword [esp + 0x84], edi
mov dword [esp + 0x8c], ebx
mov dword [esp + 0x94], ebx
mov dword [esp + 0x9c], ebx
mov dword [esp + 0xa4], ebx
mov dword [esp + 0xac], ebx
mov word [esp + 0xba], bx
mov word [esp + 0xbe], bx
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], ecx
call fcn.00409d60
mov eax, dword [0x40e90c]
add esp, 0x10
cmp eax, ebx
jl 0x402cc9
cmp dword [ebp + 0x384], ebx
je 0x402c0f
call sub.rwlib60.dll_rstmst
mov edx, dword [esp + 0x1c]
mov ecx, dword [ebp + 0x3fc]
sub eax, edx
add ecx, eax
mov dword [ebp + 0x3fc], ecx
call sub.rwlib60.dll_rstmrut
mov edx, dword [esp + 0x14]
mov ecx, dword [ebp + 0x470]
sub eax, edx
add ecx, eax
mov dword [ebp + 0x470], ecx
lea eax, [esp + 0x18]
push eax
push ebp
call fcn.00403870
add esp, 8
cmp eax, ebx
jne 0x402cc9
cmp dword [esp + 0x18], ebx
jne 0x402cc9
xor ecx, ecx
mov cx, word [edi]
inc ecx
push ecx
call dword [sym.imp.MSVCRT.dll_malloc]
mov edx, dword [esi + 4]
mov ecx, dword [esp + 0x14]
add esp, 4
mov dword [edx + ecx*4], eax
mov edx, dword [esi + 4]
mov eax, ecx
mov ecx, dword [edx + eax*4]
cmp ecx, ebx
je 0x402cc9
mov edx, dword [ebp + 0x3cc]
xor eax, eax
mov ax, word [edi]
push edx
mov edx, dword [ebp + 0x38c]
push edx
push eax
lea edx, [edi + 2]
inc eax
push edx
push eax
push ecx
call sub.NLSRTL33.dll_Ordinal_268
mov eax, dword [esi + 4]
mov edx, dword [esp + 0x28]
xor ecx, ecx
add esp, 0x18
mov cx, word [edi]
mov eax, dword [eax + edx*4]
mov byte [eax + ecx], bl
mov edx, dword [esi + 8]
mov eax, dword [esp + 0x10]
xor ecx, ecx
mov cx, word [edi]
mov dword [edx + eax*4], ecx
mov ecx, dword [esi + 0xc]
mov word [ecx + eax*2], 1
mov ecx, dword [esi + 0x14]
inc eax
cmp eax, ecx
mov dword [esp + 0x10], eax
jb 0x402a27
push edi
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xf4
ret
push edi
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov eax, 0x902
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xf4
ret