Function at 0x404d20
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 0x42086c
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 0x404dd0
push ebx
push str._0x0001000A__n_s
push 0x30
push str.file_open_error
push dword [0x425188]
call fcn.0040a820
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a88f
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 0x404e0e
push ebx
push str._0x00010001__n_s
push 0x30
push str.read_error
push dword [0x425188]
call fcn.0040a820
add esp, 0x14
push esi
jmp 0x4050e3
mov eax, dword [ebp - 0x140]
cmp eax, 0x20434150
jne 0x404e6e
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 0x404e4a
push ebx
push str._0x00010002_
jmp 0x404df3
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.0040a88f
mov esp, ebp
pop ebp
ret
mov ecx, 0x5a4d
cmp ax, cx
jne 0x4050af
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 0x404ede
push ebx
push str._0x00010003__n_s
push 0x30
push str.read_error
push dword [0x425188]
call fcn.0040a820
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a88f
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 0x404f35
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.0040a820
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.0040a88f
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 0x404f56
push ebx
push str._0x00010005__n_s
jmp 0x404f06
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.0040ca30
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [ebp - 0x24], 0x2f2a2a2f
jne 0x404fb3
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.0040a88f
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.0040cfa9
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x405090
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 0x40501a
mov al, cl
sub al, 0x41
cmp al, 0x19
ja 0x405012
add cl, 0x20
mov byte [edx], cl
mov cl, byte [edx + 1]
inc edx
test cl, cl
jne 0x405005
mov edx, dword [ebp - 0x138]
xor ecx, ecx
test edx, edx
jle 0x405043
mov al, byte [ecx + ebx]
cmp al, 0x30
jl 0x405031
cmp al, 0x39
jle 0x40503d
cmp al, 0x61
jl 0x405039
cmp al, 0x66
jle 0x40503d
cmp al, 0x78
jne 0x405043
inc ecx
inc esi
cmp ecx, edx
jl 0x405026
cmp esi, 0xffffffff
jle 0x405087
xor edx, edx
xor edi, edi
nop dword [eax]
mov cl, byte [ebx + esi]
cmp cl, 0x78
je 0x40507b
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 0x405050
mov dword [ebp - 0x134], edi
mov edi, dword [ebp - 0x13c]
push ebx
call fcn.0040cfa4
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.0040a88f
mov esp, ebp
pop ebp
ret
xor esi, esi
cmp dword [edi], esi
jle 0x4050dd
add edi, 0x10
push dword [ebp - 0x138]
push edi
push ebx
call fcn.0040d0f0
add esp, 0xc
test eax, eax
je 0x4050fc
mov eax, dword [ebp - 0x13c]
inc esi
add edi, 0x108
cmp esi, dword [eax]
jl 0x4050b8
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.0040a88f
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.0040a88f
mov esp, ebp
pop ebp
ret