Function at 0x4098a1
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
sub esp, 0x28
push esi
mov esi, edx
call fcn.004097e0
test al, al
je 0x409aaf
push ebx
push edi
xor ebx, ebx
xor edi, edi
push ebx
push 0x80
push 3
push ebx
inc edi
push edi
push 0x80000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x409aab
push ebx
lea eax, [ebp - 4]
push eax
push 6
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x409aa4
cmp word [ebp - 0x26], di
je 0x40990c
cmp word [ebp - 0x28], bx
jne 0x409aa4
movzx eax, word [ebp - 0x24]
imul eax, eax, 0xe
add eax, 6
push eax
mov dword [ebp - 0x20], eax
call fcn.00411fe0
mov ebx, eax
lea eax, [ebp - 0x28]
push 6
push eax
push ebx
mov dword [ebp - 0x14], ebx
call fcn.00412770
add esp, 0x10
lea edi, [ebx + 6]
push 0
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_BeginUpdateResourceW]
mov dword [ebp - 0xc], eax
test eax, eax
jne 0x40995b
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call fcn.00415950
pop ecx
jmp 0x409aab
and dword [ebp - 8], 0
xor eax, eax
cmp ax, word [ebp - 0x24]
jae 0x409a34
mov ebx, dword [ebp - 0xc]
push 0
lea eax, [ebp - 4]
push eax
push 0xc
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x409a1b
mov eax, dword [ebp - 8]
push 0
mov ax, word [eax*2 + 0x43de20]
mov word [edi + 0xc], ax
lea eax, [ebp - 4]
push eax
push 4
lea eax, [ebp - 0x18]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x409a1b
push 1
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push 0
push dword [ebp - 0x18]
mov dword [ebp - 0x1c], eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push dword [edi + 8]
call fcn.00411fe0
pop ecx
push 0
lea ecx, [ebp - 4]
mov dword [ebp - 0x10], eax
push ecx
push dword [edi + 8]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x409a04
push dword [edi + 8]
movzx eax, word [edi + 0xc]
push dword [ebp - 0x10]
push 0x809
push eax
push 3
push ebx
call dword [sym.imp.KERNEL32.dll_UpdateResourceW]
push dword [ebp - 0x10]
call fcn.00415950
pop ecx
push 0
push 0
push dword [ebp - 0x1c]
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [ebp - 8]
add edi, 0xe
movzx eax, word [ebp - 0x24]
inc ecx
mov dword [ebp - 8], ecx
cmp ecx, eax
jl 0x40996e
mov ebx, dword [ebp - 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
movzx esi, word [ebp - 0x24]
cmp esi, dword [0x43de14]
jge 0x409a71
mov ebx, dword [ebp - 0xc]
movzx eax, word [esi*2 + 0x43de20]
push 0
push 0
push 0x809
push eax
push 3
push ebx
call dword [sym.imp.KERNEL32.dll_UpdateResourceW]
inc esi
cmp esi, dword [0x43de14]
jl 0x409a4a
mov ebx, dword [ebp - 0x14]
push dword [ebp - 0x20]
mov esi, dword [ebp - 0xc]
push ebx
push 0x809
push 0x63
push 0xe
push esi
call dword [sym.imp.KERNEL32.dll_UpdateResourceW]
push 0
push esi
call dword [sym.imp.KERNEL32.dll_EndUpdateResourceW]
push ebx
mov esi, eax
call fcn.00415950
xor eax, eax
cmp esi, 1
pop ecx
sete al
jmp 0x409aad
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret