Function at 0x410f20
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x446010
mov eax, dword fs:[0]
push eax
sub esp, 0x34
push ebx
push esi
push edi
mov eax, dword [0x45accc]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov ebx, dword [ebp + 8]
lea eax, [ebx + 0x20274]
mov dword [ebp - 0x34], eax
mov eax, dword [eax]
push eax
call fcn.0041206c
mov edi, eax
add esp, 4
mov dword [ebp - 0x38], edi
call fcn.0041aec8
xor ecx, ecx
xor esi, esi
cmp eax, esi
setne cl
cmp ecx, esi
jne 0x410f83
push 0x80004005
call fcn.00401460
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x1c], eax
add ebx, 0x215c4
push ebx
lea ecx, [ebp - 0x11]
mov dword [ebp - 4], esi
mov dword [ebp - 0x2c], esi
call fcn.00406db0
mov ecx, dword [0x45ca30]
push esi
push 0x80
push 3
push esi
push 3
push 0xc0000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x410fe6
push 0
lea ecx, [ebp - 0x2c]
push ecx
push 0x10
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x41101e
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call fcn.00412061
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x411261
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x411261
mov edx, dword [ebp - 0x34]
push 0
lea ecx, [ebp - 0x30]
push ecx
push 4
push edx
push esi
mov dword [ebp - 0x30], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x411068
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call fcn.00412061
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x411009
push 0
lea ecx, [ebp - 0x2c]
push ecx
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x41110c
mov eax, dword [ebp - 0x34]
mov ecx, dword [eax]
push 0
lea edx, [ebp - 0x3c]
push edx
push ecx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41110c
mov edx, dword [ebp - 0x34]
mov eax, dword [edx]
push eax
push edi
push ebx
lea ecx, [ebp - 0x11]
call fcn.00406dc0
push 0
lea ecx, [ebp - 0x2c]
push ecx
push 0x1fc
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x41110c
push ebx
lea ecx, [ebp - 0x11]
call fcn.00406e00
mov dl, byte [ebx + 1]
mov al, byte [ebx]
push 0
lea ecx, [ebp - 0x30]
push ecx
mov byte [ebp - 0x18], dl
push 2
lea edx, [ebp - 0x18]
push edx
push esi
mov byte [ebp - 0x17], al
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x411121
lea eax, [ebp - 0x1c]
push str._Error__Write_header_checksum_failure____r_n
push eax
call fcn.004026d0
mov ecx, dword [ebp - 0x1c]
add esp, 8
push ecx
mov ecx, dword [ebp + 8]
push 0x3ee
call fcn.0041a30b
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call fcn.00412061
add esp, 4
jmp 0x411259
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call ebx
lea ecx, [ebp - 0x20]
call fcn.004024e0
lea ecx, [ebp - 0x24]
call fcn.004024e0
lea ecx, [ebp - 0x28]
call fcn.004024e0
push 0x45ca30
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 3
call fcn.004053a0
mov edx, dword [ebp - 0x20]
mov eax, dword [edx - 0xc]
add eax, 0xfffffffc
push eax
lea ecx, [ebp - 0x20]
call fcn.00410cd0
mov esi, dword [ebp - 0x20]
push esi
lea eax, [ebp - 0x24]
push str._s_Image_.dat
push eax
call fcn.004026d0
push esi
lea ecx, [ebp - 0x28]
push str._s_CheckSum_.dat
push ecx
call fcn.004026d0
add esp, 0x18
push 0x45ca30
lea ecx, [ebp - 0x20]
call fcn.004053a0
push 0x44af00
push 0x44a3b8
lea ecx, [ebp - 0x20]
call fcn.00410d20
push 0x44af00
push 0x44a3b8
lea ecx, [ebp - 0x24]
call fcn.00410d20
mov edx, dword [ebp - 0x24]
mov eax, dword [0x45ca30]
push edx
push eax
mov byte [ebp - 4], 4
call fcn.00420b07
push 0x44a3b8
push 0x44af00
lea ecx, [ebp - 0x24]
mov dword [ebp - 4], 3
call fcn.00410d20
mov ecx, dword [ebp - 0x24]
push ecx
mov ecx, dword [ebp + 8]
push 0x3eb
call fcn.0041a2b8
mov ecx, eax
call fcn.0041a3f8
mov edx, dword [ebp - 0x28]
push 0
push 0x80
push 2
push 0
push 3
push 0xc0000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x411238
push 0
lea eax, [ebp - 0x2c]
push eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x411278
push esi
call ebx
push edi
call fcn.00412061
add esp, 4
lea ecx, [ebp - 0x28]
call fcn.004022f0
lea ecx, [ebp - 0x24]
call fcn.004022f0
lea ecx, [ebp - 0x20]
call fcn.004022f0
lea ecx, [ebp - 0x1c]
call fcn.004022f0
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov cl, byte [ebp - 0x18]
mov dword [ebp - 0x30], 0
mov byte [edi + 0x1fc], cl
mov dl, byte [ebp - 0x17]
mov ecx, dword [ebp - 0x34]
push 0
lea eax, [ebp - 0x30]
push eax
mov byte [edi + 0x1fd], dl
mov edx, dword [ecx]
push edx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
test eax, eax
je 0x411236
call ebx
push edi
call fcn.00412061
add esp, 4
lea ecx, [ebp - 0x28]
call fcn.004022f0
lea ecx, [ebp - 0x24]
call fcn.004022f0
lea ecx, [ebp - 0x20]
call fcn.004022f0
lea ecx, [ebp - 0x1c]
call fcn.004022f0
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret