Function at 0x438020
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x148
mov eax, dword [0x4b40d8]
test eax, eax
nop
push ebx
push esi
push edi
push ebp
jne 0x438041
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x148
ret
mov esi, dword [esp + 0x15c]
test esi, esi
jl 0x4383dd
cmp esi, 0x99
jge 0x4383dd
mov eax, dword [esi*8 + 0x4cfc70]
test eax, eax
je 0x438070
push esi
call fcn.004383f0
add esp, 4
xor ebx, ebx
mov eax, dword [0x4b4030]
cmp eax, esi
je 0x438095
mov eax, 0x4b4030
mov ecx, dword [eax]
cmp ecx, 0xff
je 0x438095
mov ecx, dword [eax + 8]
add eax, 8
inc ebx
cmp ecx, esi
jne 0x438080
mov eax, dword [ebx*8 + 0x4b4030]
cmp eax, 0xff
jne 0x4380b0
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x148
ret
mov eax, dword [ebx*8 + 0x4b4034]
lea ecx, [esp + 0x58]
push eax
mov ebp, dword [sym.imp.USER32.dll_wsprintfA]
push str...SE_s
push ecx
call ebp
add esp, 0xc
lea ecx, [esp + 0x58]
push 0
push pe_nt_image_headers32
push 3
push 0
push 0
push 0x80000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov edi, eax
jne 0x43813e
mov eax, dword [ebx*8 + 0x4b4034]
lea ecx, [esp + 0x58]
push eax
push 0x455630
push str._sSE_s
push ecx
call ebp
add esp, 0x10
lea ecx, [esp + 0x58]
push 0
push pe_nt_image_headers32
push 3
push 0
push 0
push 0x80000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov edi, eax
jne 0x43813e
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x148
ret
lea eax, [esp + 0x14]
push 0
push eax
push 0xc
push 0x4cfbc0
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov al, byte [0x4cfbc0]
cmp al, 0x57
jne 0x4383c9
mov al, byte [0x4cfbc1]
cmp al, 0x56
jne 0x4383c9
mov al, byte [0x4cfbc2]
cmp al, 0x50
jne 0x4383c9
mov eax, dword [0x4cfbc4]
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
lea eax, [eax + eax*4]
shl eax, 3
push eax
push 0x42
call ebx
push eax
mov ebp, dword [sym.imp.KERNEL32.dll_GlobalLock]
call ebp
push 0
mov ecx, dword [0x4cfbc4]
mov dword [esp + 0x14], eax
lea eax, [esp + 0x18]
push eax
lea eax, [ecx + ecx*4]
shl eax, 3
mov ecx, dword [esp + 0x18]
push eax
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [0x4cfbc8]
lea eax, [ecx + ecx*2 + 3]
shl eax, 2
push eax
push 0x42
call ebx
push eax
call ebp
mov ecx, dword [0x4cfbc4]
mov dword [esi*8 + 0x4cfc70], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x28], eax
mov eax, dword [0x4cfbc8]
inc eax
test ecx, ecx
mov dword [esi*8 + 0x4cfc74], eax
jle 0x43835a
mov esi, dword [esp + 0x10]
add esi, 0x18
mov eax, dword [esi - 0x18]
mov ecx, dword [esp + 0x28]
lea edx, [eax + eax*2]
mov eax, dword [esi + 4]
mov word [ecx + edx*4 + 0xa], ax
lea ebx, [ecx + edx*4]
mov ecx, dword [esi + 8]
mov word [ebx + 8], cx
mov edx, dword [esi + 0xc]
mov dword [ebx + 4], edx
mov ebp, dword [esi]
test ebp, ebp
jne 0x43823a
mov dword [ebx], 0
jmp 0x438340
mov ax, word [esi - 0x14]
push 0
mov word [esp + 0x34], ax
push ebx
mov cx, word [esi - 0x12]
mov word [esp + 0x3a], cx
mov edx, dword [esi - 0x10]
mov dword [esp + 0x3c], edx
mov eax, dword [esi - 0xc]
mov dword [esp + 0x40], eax
lea eax, [esp + 0x4c]
mov cx, word [esi - 8]
mov word [esp + 0x44], cx
lea ecx, [esp + 0x38]
mov dx, word [esi - 6]
mov word [esp + 0x46], dx
mov dword [eax], 0
mov dword [eax + 4], 0
mov dword [eax + 8], 0
mov dword [eax + 0xc], 0
mov dword [eax + 0x10], 0
lea eax, [esp + 0x4c]
mov edx, dword [0x4b40d8]
mov dword [esp + 0x54], ebp
push eax
mov dword [esp + 0x60], ecx
push edx
mov dword [esp + 0x54], 0x14
mov dword [esp + 0x58], 0xea
mov word [esp + 0x50], 0
mov eax, dword [edx]
call dword [eax + 0xc]
test eax, eax
jne 0x438393
mov ecx, dword [ebx]
push 0
lea eax, [esp + 0x20]
lea edx, [esp + 0x30]
push eax
push edx
lea eax, [esp + 0x2c]
lea edx, [esp + 0x30]
push eax
push edx
push ebp
push 0
push ecx
mov ebp, dword [ecx]
call dword [ebp + 0x2c]
test eax, eax
jne 0x438340
lea eax, [esp + 0x14]
push 0
mov ecx, dword [esp + 0x24]
push eax
mov edx, dword [esp + 0x2c]
push ecx
push edx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x43832a
lea eax, [esp + 0x14]
push 0
mov edx, dword [esp + 0x30]
push eax
push ecx
push edx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebx]
push 0
mov eax, dword [esp + 0x24]
push 0
mov edx, dword [esp + 0x2c]
push eax
push edx
mov ebx, dword [ecx]
push ecx
call dword [ebx + 0x4c]
add esi, 0x28
mov eax, dword [esp + 0x18]
inc eax
mov ecx, dword [0x4cfbc4]
mov dword [esp + 0x18], eax
cmp ecx, eax
jg 0x438207
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
push eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [esp + 0x10]
push eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, 1
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x148
ret
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
push eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [esp + 0x10]
push eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x148
ret
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x148
ret
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x148
ret