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

Disassembly:
push 0x324
mov eax, 0x4c63fb
call fcn.004a9047
mov eax, dword [ebp + 0x10]
xor ebx, ebx
cmp eax, ebx
jne 0x439198
call fcn.004210de
push eax
lea ecx, [ebp - 0xdc]
call fcn.00426f24
mov dword [ebp - 4], ebx
call fcn.004210e4
mov ecx, eax
call fcn.00426c11
test al, al
je 0x43908d
push dword [ebp + 8]
lea ecx, [ebp - 0xdc]
call fcn.00426cb1
push ebx
push 0x80
push 3
push ebx
push 1
push closesocket
lea ecx, [ebp - 0xdc]
call fcn.00426af4
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x318], eax
cmp eax, 0xffffffff
jne 0x439029
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xdc]
call fcn.00426ad2
jmp 0x43922a
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, ebx
je 0x439015
lea eax, [esi + 1]
push eax
mov dword [ebp - 0x31c], ebx
call fcn.004a6b98
mov edi, eax
lea eax, [esi + 1]
push eax
push ebx
push edi
call fcn.004a8b80
add esp, 0x10
push ebx
lea eax, [ebp - 0x31c]
push eax
push esi
push edi
push dword [ebp - 0x318]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x318]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x31c], esi
je 0x439184
push edi
call fcn.004a8370
pop ecx
jmp 0x439015
call fcn.004210e4
push eax
lea ecx, [ebp - 0xdc]
call fcn.00426c94
call fcn.004210ea
test al, al
je 0x4390ae
call fcn.004210f0
jmp 0x4390c5
push 2
push ebx
lea ecx, [ebp - 0xdc]
call fcn.00426af4
push eax
call fcn.00433657
add esp, 0xc
mov dword [ebp - 0x314], eax
cmp eax, ebx
je 0x439015
lea eax, [ebp - 0x30c]
push eax
lea eax, [ebp - 0x320]
push eax
push 1
push dword [ebp + 8]
push dword [ebp - 0x314]
call fcn.00431cac
add esp, 0x14
test eax, eax
jne 0x439015
mov esi, dword [ebp - 0xe0]
cmp esi, ebx
je 0x439015
lea eax, [esi + 1]
push eax
mov dword [ebp - 0x318], eax
call fcn.004a6b98
push dword [ebp - 0x318]
mov edi, eax
push ebx
push edi
call fcn.004a8b80
push 3
push esi
push edi
push dword [ebp - 0x320]
push dword [ebp - 0x314]
call fcn.004336b5
add esp, 0x24
cmp eax, ebx
je 0x43916f
cmp eax, 0x600
je 0x43916f
push edi
call fcn.004a8370
pop ecx
call fcn.004210ea
test al, al
jne 0x439015
push dword [ebp - 0x314]
call fcn.004336ed
jmp 0x43908a
call fcn.004210ea
test al, al
jne 0x439184
push dword [ebp - 0x314]
call fcn.004336ed
pop ecx
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xdc]
call fcn.00426ad2
jmp 0x439222
push eax
push dword [ebp + 8]
call fcn.004210cf
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
mov dword [ebp - 0x318], esi
cmp esi, ebx
je 0x43922a
push esi
call fcn.004210cf
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x320], eax
push esi
cmp eax, ebx
jne 0x4391d4
call dword [sym.imp.KERNEL32.dll_FreeResource]
jmp 0x43922a
call fcn.004210cf
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
cmp esi, ebx
je 0x43922a
lea eax, [esi + 1]
push eax
call fcn.004a6b98
mov edi, eax
lea eax, [esi + 1]
push eax
push ebx
push edi
call fcn.004a8b80
add esp, 0x10
push esi
push dword [ebp - 0x320]
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
push edi
call fcn.004a9120
add esp, 0xc
push dword [ebp - 0x318]
call dword [sym.imp.KERNEL32.dll_FreeResource]
cmp edi, ebx
jne 0x4392b9
push ebx
push 0x80
push 3
push ebx
push 1
push closesocket
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x318], eax
cmp eax, 0xffffffff
je 0x4392b2
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, ebx
je 0x4392b2
lea eax, [esi + 1]
push eax
mov dword [ebp - 0x314], ebx
call fcn.004a6b98
mov edi, eax
lea eax, [esi + 1]
push eax
push ebx
push edi
call fcn.004a8b80
add esp, 0x10
push ebx
lea eax, [ebp - 0x314]
push eax
push esi
push edi
push dword [ebp - 0x318]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x318]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x314], esi
je 0x4392ae
push edi
call fcn.004a8370
pop ecx
xor edi, edi
cmp edi, ebx
jne 0x4392b9
xor eax, eax
jmp 0x4395cd
push 4
lea eax, [ebp - 0x330]
push eax
lea eax, [ebp - 0x324]
push eax
lea eax, [ebp - 0x328]
push eax
push esi
push edi
call fcn.00461aee
push edi
mov dword [ebp - 0x318], eax
call fcn.004a8370
add esp, 0x1c
cmp dword [ebp - 0x318], ebx
je 0x4392b2
push 0x2c
lea eax, [ebp - 0x3c]
push ebx
push eax
call fcn.004a8b80
mov eax, dword [ebp - 0x328]
mov ecx, dword [ebp - 0x324]
mov dword [ebp - 0x38], eax
imul eax, dword [ebp - 0x324]
add esp, 0xc
neg ecx
push 0x20
xor esi, esi
mov dword [ebp - 0x34], ecx
inc esi
mov ecx, esi
mov word [ebp - 0x30], cx
pop ecx
push ebx
shl eax, 2
push ebx
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x310]
push eax
push ebx
lea eax, [ebp - 0x3c]
push eax
push ebx
mov dword [ebp - 0x3c], 0x28
mov word [ebp - 0x2e], cx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x310], ebx
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov dword [ebp - 0x32c], eax
cmp eax, ebx
je 0x4392b2
push dword [ebp + 8]
lea ecx, [ebp - 0x58]
call fcn.00401d5f
mov eax, dword [ebp - 0x328]
imul eax, dword [ebp - 0x324]
mov dword [ebp - 4], esi
mov dword [ebp - 0x31c], ebx
test eax, eax
jle 0x439561
mov edi, dword [ebp - 0x31c]
mov eax, dword [ebp - 0x318]
mov ecx, dword [ebp - 0x310]
shl edi, 2
lea esi, [edi + eax + 3]
mov al, byte [esi]
mov byte [edi + ecx + 3], al
call fcn.004229b5
test eax, eax
je 0x439493
push str.common_nation_flags_flags.gif
call fcn.004a9b2e
pop ecx
push eax
push str.common_nation_flags_flags.gif
push dword [ebp - 0x48]
lea ecx, [ebp - 0x58]
push ebx
call fcn.0040274c
test eax, eax
je 0x439493
mov eax, dword [ebp - 0x310]
add eax, edi
xor edx, edx
cmp byte [eax + 3], 0xff
mov dword [ebp - 0x314], eax
movzx eax, byte [esi - 2]
push 0x64
jae 0x439469
movzx ecx, byte [esi]
imul eax, ecx
mov ebx, 0xff
div ebx
xor edx, edx
pop ebx
mov dword [ebp - 0x320], ecx
push 0x64
imul eax, eax, 0x3b
div ebx
xor edx, edx
mov ebx, eax
movzx eax, byte [esi - 3]
imul eax, ecx
mov ecx, 0xff
div ecx
xor edx, edx
pop ecx
push 0xa
imul eax, eax, 0xb
div ecx
xor edx, edx
mov ecx, 0xff
add bl, al
movzx eax, byte [esi - 1]
imul eax, dword [ebp - 0x320]
div ecx
xor edx, edx
pop ecx
imul eax, eax, 3
div ecx
add al, bl
mov ecx, dword [ebp - 0x314]
mov byte [ecx], al
mov ecx, dword [ebp - 0x310]
mov byte [edi + ecx + 1], al
xor ebx, ebx
jmp 0x439509
imul eax, eax, 0x3b
pop ecx
div ecx
push 0x64
xor edx, edx
pop ebx
push 0xa
mov ecx, eax
movzx eax, byte [esi - 3]
imul eax, eax, 0xb
div ebx
xor edx, edx
add cl, al
movzx eax, byte [esi - 1]
imul eax, eax, 3
pop esi
div esi
add al, cl
jmp 0x439450
mov eax, dword [ebp - 0x310]
add eax, edi
cmp byte [eax + 3], 0xff
mov dword [ebp - 0x314], eax
jae 0x4394f4
movzx ecx, byte [esi]
movzx eax, byte [esi - 1]
imul eax, ecx
xor edx, edx
mov ecx, 0xff
div ecx
mov ecx, dword [ebp - 0x314]
xor edx, edx
mov byte [ecx], al
movzx ecx, byte [esi]
movzx eax, byte [esi - 2]
imul eax, ecx
mov ecx, 0xff
div ecx
mov ecx, dword [ebp - 0x310]
xor edx, edx
mov byte [edi + ecx + 1], al
movzx ecx, byte [esi]
movzx eax, byte [esi - 3]
imul eax, ecx
mov ecx, 0xff
div ecx
jmp 0x439509
mov cl, byte [esi - 1]
mov byte [eax], cl
mov al, byte [esi - 2]
mov ecx, dword [ebp - 0x310]
mov byte [edi + ecx + 1], al
mov al, byte [esi - 3]
mov ecx, dword [ebp - 0x310]
mov byte [edi + ecx + 2], al
mov eax, dword [ebp - 0x310]
mov ecx, dword [eax + edi]
cmp ecx, dword [ebp + 0x14]
jne 0x439542
mov byte [eax + edi], bl
mov eax, dword [ebp - 0x310]
mov byte [edi + eax + 1], bl
mov eax, dword [ebp - 0x310]
mov byte [edi + eax + 2], bl
mov eax, dword [ebp - 0x310]
mov byte [edi + eax + 3], bl
mov eax, dword [ebp - 0x328]
imul eax, dword [ebp - 0x324]
inc dword [ebp - 0x31c]
cmp dword [ebp - 0x31c], eax
jl 0x43938a
push dword [ebp - 0x318]
call fcn.004582af
push 0xa0
call fcn.004a7b89
pop ecx
mov esi, eax
pop ecx
mov dword [ebp - 0x320], esi
mov byte [ebp - 4], 2
cmp esi, ebx
je 0x439592
lea ecx, [esi + 0x18]
call fcn.00426aaa
jmp 0x439594
xor esi, esi
mov eax, dword [ebp - 0x32c]
mov dword [esi], eax
mov eax, dword [ebp - 0x310]
mov dword [esi + 4], eax
mov eax, dword [ebp - 0x328]
mov dword [esi + 0xc], eax
mov eax, dword [ebp - 0x324]
push ebx
push 1
lea ecx, [ebp - 0x58]
mov dword [esi + 0x10], eax
mov word [esi + 0x14], 1
mov dword [esi + 8], ebx
call fcn.004020c1
mov eax, esi
call fcn.004a9091
ret