Function at 0x4021a0
Capabilities:
Read file via mapping
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x18
mov eax, dword [esp + 0x1c]
mov byte [esp + 3], 0
mov byte [esp + 2], 0
test eax, eax
je 0x402443
cmp dword [esp + 0x20], 0
je 0x402443
push ebx
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
je 0x402433
test eax, eax
je 0x402433
push 0
push 0
push 0
push 2
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov ebx, eax
mov dword [esp + 0x18], ebx
test ebx, ebx
je 0x40243a
push esi
push 0
push 0
push 0
push 4
push ebx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov esi, eax
test esi, esi
je 0x402422
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
push 0x40
push esi
call ebp
test eax, eax
jne 0x40241a
mov eax, 0x5a4d
cmp word [esi], ax
jne 0x40241a
push edi
mov edi, dword [esi + 0x3c]
push pe_nt_image_headers32
add edi, esi
push edi
call ebp
test eax, eax
jne 0x402419
movzx eax, word [edi + 4]
mov ecx, 0x8664
cmp cx, ax
jne 0x4022a3
mov edi, dword [esi + 0x3c]
push 0x108
add edi, esi
push edi
mov byte [esp + 0x1a], 1
call ebp
test eax, eax
jne 0x402419
mov edi, dword [edi + 0x88]
test edi, edi
je 0x402419
push eax
push edi
push esi
call fcn.00402130
add esp, 0xc
jmp 0x4022c6
mov edx, 0x14c
cmp dx, ax
jne 0x402419
mov edi, dword [edi + 0x78]
test edi, edi
je 0x402419
push edi
push esi
call fcn.004020e0
add esp, 8
lea ebx, [eax + esi]
test ebx, ebx
je 0x402415
push 0x28
push ebx
call ebp
test eax, eax
jne 0x402415
cmp byte [esp + 0x12], al
je 0x4022f5
mov eax, dword [ebx + 0x20]
push 0
push eax
push esi
call fcn.00402130
add esp, 0xc
jmp 0x402302
mov ecx, dword [ebx + 0x20]
push ecx
push esi
call fcn.004020e0
add esp, 8
mov edi, dword [ebx + 0x24]
add eax, esi
push edi
push esi
mov dword [esp + 0x28], eax
call fcn.004020e0
mov ebp, dword [ebx + 0x1c]
add eax, esi
push ebp
push esi
mov dword [esp + 0x2c], eax
call fcn.004020e0
add eax, esi
add esp, 0x10
cmp byte [esp + 0x12], 0
mov dword [esp + 0x18], eax
je 0x402353
push 0
push edi
push esi
call fcn.00402130
push 0
add eax, esi
push ebp
push esi
mov dword [esp + 0x34], eax
call fcn.00402130
add esp, 0x18
add eax, esi
mov dword [esp + 0x18], eax
xor eax, eax
mov dword [esp + 0x14], eax
cmp dword [ebx + 0x14], eax
jbe 0x402410
mov edx, dword [esp + 0x18]
cmp dword [edx + eax*4], 0
je 0x402402
xor edi, edi
cmp dword [ebx + 0x18], edi
jbe 0x402402
jmp 0x402380
mov ecx, dword [esp + 0x1c]
movzx edx, word [ecx + edi*2]
cmp edx, eax
jne 0x4023df
cmp byte [esp + 0x12], 0
je 0x4023a8
mov eax, dword [esp + 0x20]
mov ecx, dword [eax + edi*4]
push 0
push ecx
push esi
call fcn.00402130
add esp, 0xc
jmp 0x4023b9
mov edx, dword [esp + 0x20]
mov eax, dword [edx + edi*4]
push eax
push esi
call fcn.004020e0
add esp, 8
lea ebp, [eax + esi]
push 1
push ebp
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x4023db
mov ecx, dword [esp + 0x30]
push ecx
push ebp
call fcn.0040a38f
add esp, 8
test eax, eax
je 0x4023e7
mov eax, dword [esp + 0x14]
inc edi
cmp edi, dword [ebx + 0x18]
jb 0x402380
jmp 0x402402
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x2c]
push edx
push eax
push str.__48s_t____s_n
call fcn.0040a0a0
mov eax, dword [esp + 0x20]
add esp, 0xc
inc eax
mov dword [esp + 0x14], eax
cmp eax, dword [ebx + 0x14]
jb 0x402362
mov byte [esp + 0x13], 1
mov ebx, dword [esp + 0x24]
pop edi
push esi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
pop ebp
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [esp + 0xb]
pop esi
pop ebx
add esp, 0x18
ret
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [esp + 7]
pop ebx
add esp, 0x18
ret
xor al, al
add esp, 0x18
ret