Function at 0x404ea0
Capabilities:
Extract resource via kernel32 functions
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x144
mov eax, dword [0x424008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov ebx, ecx
mov edi, edx
push ebx
mov dword [ebp - 0x13c], edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push ebx
push 0x42520c
mov dword [ebp - 0x138], eax
lea eax, [ebp - 0x130]
push 0x420870
push eax
mov dword [edi + 8], 0
mov dword [edi + 0xc], 0
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [ebp - 0x130]
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
mov dword [ebp - 0x134], esi
cmp esi, 0xffffffff
jne 0x404f50
push ebx
push str._0x0001000A__n_s
push 0x30
push str.file_open_error
push dword [0x425188]
call fcn.0040a9a0
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040aa0f
mov esp, ebp
pop ebp
ret
push 0
lea eax, [ebp - 0x144]
push eax
push 4
lea eax, [ebp - 0x140]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x404f8e
push ebx
push str._0x00010001__n_s
push 0x30
push str.read_error
push dword [0x425188]
call fcn.0040a9a0
add esp, 0x14
push esi
jmp 0x405263
mov eax, dword [ebp - 0x140]
cmp eax, 0x20434150
jne 0x404fee
push 2
push 0
push 0xfffffffffffffff8
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x144]
push eax
push 4
lea eax, [edi + 4]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x404fca
push ebx
push str._0x00010002_
jmp 0x404f73
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 8], 8
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040aa0f
mov esp, ebp
pop ebp
ret
mov ecx, 0x5a4d
cmp ax, cx
jne 0x40522f
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x42520c
lea eax, [ebp - 0x130]
push str._sdllRESOURCE.dll
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x130]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
jne 0x40505e
push ebx
push str._0x00010003__n_s
push 0x30
push str.read_error
push dword [0x425188]
call fcn.0040a9a0
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040aa0f
mov esp, ebp
pop ebp
ret
push 0xa
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov dword [ebp - 0x134], eax
test eax, eax
jne 0x4050b5
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
push eax
push str._0x00010004__n_s
push 0x30
push str.read_error
push dword [0x425188]
call fcn.0040a9a0
add esp, 0x14
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040aa0f
mov esp, ebp
pop ebp
ret
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x138], eax
test eax, eax
jne 0x4050d6
push ebx
push str._0x00010005__n_s
jmp 0x405086
push dword [ebp - 0x134]
xorps xmm0, xmm0
push esi
movups xmmword [ebp - 0x24], xmm0
movups xmmword [ebp - 0x14], xmm0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push eax
push dword [ebp - 0x138]
lea eax, [ebp - 0x24]
push eax
call fcn.0040cbb0
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [ebp - 0x24], 0x2f2a2a2f
jne 0x405133
mov eax, dword [ebp - 0x20]
mov dword [edi + 0xc], eax
mov eax, dword [ebp - 0x1c]
mov dword [edi + 4], eax
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040aa0f
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x24]
mov byte [ebp - 0x1c], 0
push eax
mov dword [ebp - 0x134], 0
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov dword [ebp - 0x138], eax
or esi, 0xffffffff
lea ecx, [eax + 1]
push ecx
call fcn.0040d129
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x405210
lea eax, [ebp - 0x24]
push eax
push 0x420ecc
push ebx
call dword [sym.imp.USER32.dll_wsprintfA]
mov cl, byte [ebx]
add esp, 0xc
mov edx, ebx
test cl, cl
je 0x40519a
mov al, cl
sub al, 0x41
cmp al, 0x19
ja 0x405192
add cl, 0x20
mov byte [edx], cl
mov cl, byte [edx + 1]
inc edx
test cl, cl
jne 0x405185
mov edx, dword [ebp - 0x138]
xor ecx, ecx
test edx, edx
jle 0x4051c3
mov al, byte [ecx + ebx]
cmp al, 0x30
jl 0x4051b1
cmp al, 0x39
jle 0x4051bd
cmp al, 0x61
jl 0x4051b9
cmp al, 0x66
jle 0x4051bd
cmp al, 0x78
jne 0x4051c3
inc ecx
inc esi
cmp ecx, edx
jl 0x4051a6
cmp esi, 0xffffffff
jle 0x405207
xor edx, edx
xor edi, edi
nop dword [eax]
mov cl, byte [ebx + esi]
cmp cl, 0x78
je 0x4051fb
mov al, cl
mov ah, 5
sub al, 0x61
cmp ah, al
sbb al, al
add cl, 0xa9
and al, 0x27
dec esi
add al, cl
mov ecx, edx
movsx eax, al
add edx, 4
shl eax, cl
add edi, eax
cmp esi, 0xffffffff
jg 0x4051d0
mov dword [ebp - 0x134], edi
mov edi, dword [ebp - 0x13c]
push ebx
call fcn.0040d124
add esp, 4
mov eax, dword [ebp - 0x134]
mov dword [edi + 4], eax
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040aa0f
mov esp, ebp
pop ebp
ret
xor esi, esi
cmp dword [edi], esi
jle 0x40525d
add edi, 0x10
push dword [ebp - 0x138]
push edi
push ebx
call fcn.0040d270
add esp, 0xc
test eax, eax
je 0x40527c
mov eax, dword [ebp - 0x13c]
inc esi
add edi, 0x108
cmp esi, dword [eax]
jl 0x405238
push dword [ebp - 0x134]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040aa0f
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x13c]
push dword [ebp - 0x134]
imul eax, esi, 0x108
mov eax, dword [eax + ecx + 0x114]
mov dword [ecx + 4], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
mov eax, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040aa0f
mov esp, ebp
pop ebp
ret