Function at 0x4043d0
Capabilities:
Extract resource via kernel32 functions
Get file size
Read file on windows

Disassembly:
sub esp, 0xe8
push ebx
mov eax, dword [esp + 0xf8]
push ebp
push esi
xor ebp, ebp
push edi
push ebp
push 0x80
push 3
push ebp
push ebp
push DirectSoundCreate
push eax
mov dword [esp + 0x30], ebp
mov dword [esp + 0x40], ebp
mov dword [esp + 0x34], ebp
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x48], ebp
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x40447b
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
cmp eax, ebp
mov dword [esp + 0x14], eax
je 0x404853
mov ecx, eax
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov edi, eax
test edi, edi
je 0x404853
push ebp
push ebp
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea edx, [esp + 0x2c]
push ebp
push edx
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x404853
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [edi + 0xa]
lea edx, [edi + 0xe]
mov dword [esp + 0x1c], edx
add esi, edi
jmp 0x4044cc
mov eax, dword [esp + 0x100]
mov ecx, dword [0x4701cc]
push 2
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, ebp
mov dword [esp + 0x18], eax
je 0x404820
mov edx, eax
mov eax, dword [0x4701cc]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], 1
mov dword [esp + 0x1c], eax
mov edx, eax
mov ebp, eax
mov edi, dword [edx + 0x20]
test edi, edi
jne 0x40450c
xor eax, eax
mov ax, word [edx + 0xe]
dec eax
cmp eax, 0x17
ja case.0x4044eb.5
xor ecx, ecx
mov cl, byte [eax + 0x404888]
jmp dword [ecx*4 + 0x404874]
push 0x41eb40
jmp 0x404810
mov edi, 0x10
jmp 0x40450c
mov edi, 0x100
jmp 0x40450c
xor edi, edi
mov eax, dword [esp + 0x24]
xor ebx, ebx
mov bx, word [edx + 0xe]
test eax, eax
mov dword [esp + 0x10], ebx
je 0x404525
mov eax, dword [edx]
lea esi, [eax + edi*4]
add esi, ebp
test edi, edi
je 0x404538
mov ecx, dword [esp + 0xfc]
lea eax, [edi - 1]
mov dword [ecx + 0xc], eax
jmp 0x404546
mov ecx, dword [esp + 0xfc]
mov dword [ecx + 0xc], 0
mov eax, dword [edx + 4]
mov ebp, dword [edx + 8]
lea edx, [ebx - 1]
mov dword [ecx + 4], eax
cmp edx, 0x17
mov dword [ecx + 8], ebp
ja case.0x404562.5
xor ebx, ebx
mov bl, byte [edx + 0x4048b4]
jmp dword [ebx*4 + 0x4048a0]
add eax, 7
and al, 0xf8
mov dword [ecx + 4], eax
imul eax, ebp
mov ebx, eax
jmp 0x4045af
add eax, 3
and al, 0xfc
mov dword [ecx + 4], eax
imul eax, ebp
shr eax, 1
lea ebx, [eax + edi*2]
jmp 0x4045af
add eax, 3
and al, 0xfc
mov dword [ecx + 4], eax
imul eax, ebp
lea ebx, [eax + edi*2]
jmp 0x4045af
add eax, 3
and al, 0xfc
mov dword [ecx + 4], eax
imul eax, ebp
shl eax, 1
mov ebx, eax
jmp 0x4045af
mov ebx, dword [esp + 0x2c]
mov edx, dword [ecx + 4]
mov eax, edx
mov dword [esp + 0x28], edx
imul eax, ebp
test eax, eax
jne 0x4045f3
push ebp
push edx
lea edx, [esp + 0x38]
push 0x41eb88
push edx
call fcn.004179d0
add esp, 0x10
lea eax, [esp + 0x30]
push 0x2000
push 0x41eba4
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov ebp, dword [esp + 0x20]
jmp 0x404818
mov ecx, dword [ecx]
test ecx, ecx
je 0x404600
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0xfc]
dec ecx
cmp ecx, 0x17
mov dword [edx], eax
ja case.0x404628.5
xor ebx, ebx
mov bl, byte [ecx + 0x4048e0]
jmp dword [ebx*4 + 0x4048cc]
mov edx, dword [edx + 0xc]
mov ecx, eax
test edi, edi
lea edx, [eax + edx*2 + 2]
mov dword [esp + 0x10], edx
jle 0x40467f
mov eax, dword [esp + 0x1c]
add eax, 0x29
movzx dx, byte [eax + 1]
movzx bx, byte [eax]
and edx, 0x1f8
and ebx, 0x3ff8
shl edx, 5
add edx, ebx
mov bl, byte [eax - 1]
shr bl, 3
movzx bx, bl
add ecx, 2
add eax, 4
lea edx, [ebx + edx*4]
dec edi
mov word [ecx - 2], dx
jne 0x404647
mov edx, dword [esp + 0x10]
test ebp, ebp
jbe case.0x404628.1
mov edi, dword [esp + 0x28]
shr edi, 1
test edi, edi
jbe 0x40469c
mov eax, edi
mov cl, byte [esi]
mov byte [edx], cl
inc edx
inc esi
dec eax
jne 0x404693
dec ebp
jne 0x40468d
jmp case.0x404628.1
mov edx, dword [edx + 0xc]
mov ecx, eax
test edi, edi
lea edx, [eax + edx*2 + 2]
mov dword [esp + 0x10], edx
jle 0x4046f4
mov eax, dword [esp + 0x1c]
add eax, 0x29
movzx dx, byte [eax + 1]
movzx bx, byte [eax]
and edx, 0x1f8
and ebx, 0x3ff8
shl edx, 5
add edx, ebx
mov bl, byte [eax - 1]
shr bl, 3
movzx bx, bl
add ecx, 2
add eax, 4
lea edx, [ebx + edx*4]
dec edi
mov word [ecx - 2], dx
jne 0x4046bc
mov edx, dword [esp + 0x10]
test ebp, ebp
jbe case.0x404628.1
mov eax, dword [esp + 0x28]
test eax, eax
jbe 0x404709
mov cl, byte [esi]
mov byte [edx], cl
inc edx
inc esi
dec eax
jne 0x404700
dec ebp
jne 0x4046f8
jmp case.0x404628.1
xor edi, edi
test ebp, ebp
jbe case.0x404628.1
mov ecx, dword [esp + 0x28]
test ecx, ecx
jbe 0x40474f
mov dl, byte [esi + 2]
mov bl, byte [esi + 1]
shr dl, 3
movzx dx, dl
shr bl, 3
movzx bx, bl
shl edx, 5
add edx, ebx
mov bl, byte [esi]
shr bl, 3
movzx bx, bl
shl edx, 5
add edx, ebx
add esi, 3
mov word [eax], dx
add eax, 2
dec ecx
jne 0x40471c
inc edi
cmp edi, ebp
jb 0x404714
mov eax, dword [esp + 0x24]
test eax, eax
je 0x4047a0
mov edi, dword [esp + 0x20]
mov esi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
push edi
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov ecx, dword [esp + 0xfc]
pop edi
pop esi
pop ebp
mov dword [ecx + 0x10], 0
xor eax, eax
pop ebx
add esp, 0xe8
ret
mov esi, dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, dword [esp + 0xfc]
pop edi
pop esi
pop ebp
mov dword [ecx + 0x10], 0
xor eax, eax
pop ebx
add esp, 0xe8
ret
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x30]
push edx
push 0x41ebac
push eax
call fcn.004179d0
add esp, 0xc
lea ecx, [esp + 0x30]
push 0x2000
push str.error
push ecx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0xe8
ret
push str.load_bmp_:
call fcn.00414880
add esp, 4
mov eax, dword [esp + 0x24]
test eax, eax
je 0x404853
mov esi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
push ebp
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebp
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_FreeResource]
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0xe8
ret
mov esi, dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0xe8
ret