Function at 0x413d46
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68
mov eax, dword [0x47f5c8]
push ebx
xor ebx, ebx
mov dword [ebp - 0x20], eax
cmp eax, ebx
mov dword [ebp - 0x10], ebx
jle 0x414148
push esi
push edi
mov dword [ebp - 0x1c], 0x64
mov esi, 0x42cc5c
push dword [ebp - 0x10]
mov ecx, 0x47f5bc
call fcn.0041fafa
mov edi, eax
mov dword [ebp - 0x14], edi
push dword [edi + 0x28]
call fcn.004139c0
test al, al
pop ecx
je 0x414130
lea eax, [edi + 4]
mov ecx, 0x47f0b8
push eax
mov dword [ebp - 0xc], eax
call fcn.004174c1
add edi, 0x10
mov ecx, 0x47f0b8
push edi
call fcn.004174c1
mov eax, dword [ebp - 0x14]
mov ecx, 0x47f0b8
add eax, 0x1c
push eax
mov dword [ebp - 8], eax
call fcn.004174c1
mov ecx, dword [ebp - 0xc]
push 1
push ebx
push 0x42cc78
call fcn.0041d929
mov ecx, dword [ebp - 0xc]
push eax
push ebx
call fcn.0041ddf8
push eax
lea ecx, [ebp - 0x44]
call fcn.0041cffc
push 1
lea ecx, [ebp - 0x44]
call fcn.0041de81
push eax
call fcn.0040e6d2
pop ecx
pop ecx
mov ecx, dword [ebp - 0xc]
call fcn.0041de81
push eax
call fcn.0040ea14
test al, al
pop ecx
jne 0x413e4c
mov ecx, dword [ebp - 0xc]
call fcn.0041de81
push 0x47f8b4
push eax
mov ecx, 0x47f8a8
call fcn.00422f7e
mov ecx, dword [ebp - 0xc]
push ebx
push 0x80
push 4
push ebx
push 1
push 0x40000000
call fcn.0041de81
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x14]
cmp dword [eax], 1
jne 0x413f2d
mov ecx, dword [ebp - 0xc]
push ebx
push 0x80
push 4
push ebx
push 1
push 0xc0000000
call fcn.0041de81
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x414128
push ebx
push edi
mov dword [ebp - 0x24], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x24]
push 2
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push dword [ebp - 8]
lea ecx, [ebp - 0x50]
call fcn.0041cffc
cmp dword [ebp - 0x14], ebx
jbe 0x413ef9
cmp dword [ebp - 0x14], 1
jbe 0x413eee
push 2
push ebx
push 0xfffffffffffffffe
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 0x28]
push ebx
push eax
lea eax, [ebp - 4]
push 2
push eax
push edi
mov byte [ebp - 4], bl
mov byte [ebp - 3], bl
mov byte [ebp - 2], bl
mov dword [ebp - 0x28], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 4]
push eax
push esi
call fcn.00425d50
pop ecx
test eax, eax
pop ecx
je 0x413ef9
push ebx
push ebx
push esi
lea ecx, [ebp - 0x50]
call fcn.0041db83
push ebx
push esi
lea ecx, [ebp - 0x50]
call fcn.0041d195
lea eax, [ebp - 0x2c]
push ebx
push eax
lea ecx, [ebp - 0x50]
push dword [ebp - 0x50]
mov dword [ebp - 0x2c], ebx
call fcn.0041de81
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x50]
jmp 0x41410b
lea ecx, [ebp - 0x38]
call fcn.0041cf28
mov ecx, dword [ebp - 0xc]
push ebx
push ebx
call fcn.0041de81
push eax
lea ecx, [ebp - 0x38]
call fcn.0041dc28
test eax, eax
jl 0x414040
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
cmp eax, ebx
jne 0x413f7b
mov ecx, dword [ebp - 8]
push ebx
push esi
call fcn.0041d195
push ebx
push ebx
mov ecx, dword [ebp - 8]
call fcn.0041de81
push eax
lea ecx, [ebp - 0x38]
call fcn.0041db83
jmp 0x4140f7
cmp eax, 2
jne 0x413fb0
push ebx
push esi
mov ecx, edi
call fcn.0041d195
push ebx
push ebx
mov ecx, edi
call fcn.0041de81
push eax
lea ecx, [ebp - 0x38]
call fcn.0041d81e
cmp eax, 0xffffffff
je 0x414040
mov edi, dword [edi]
push ebx
lea eax, [edi + eax - 2]
jmp 0x41404e
cmp eax, 3
jne 0x413fd7
push ebx
push esi
mov ecx, edi
call fcn.0041d195
push ebx
push 1
push ebx
mov ecx, edi
call fcn.0041de81
push eax
lea ecx, [ebp - 0x38]
call fcn.0041d564
jmp 0x4140f7
cmp eax, 4
jne 0x414011
push ebx
push esi
mov ecx, edi
call fcn.0041d195
mov ecx, dword [ebp - 8]
push ebx
push esi
call fcn.0041d195
push ebx
push ebx
mov ecx, edi
call fcn.0041de81
push eax
lea ecx, [ebp - 0x38]
call fcn.0041d81e
cmp eax, 0xffffffff
je 0x414040
mov edi, dword [edi]
push ebx
add edi, eax
push edi
jmp 0x413f65
cmp eax, 5
jne 0x414054
push ebx
push esi
mov ecx, edi
call fcn.0041d195
mov ecx, dword [ebp - 8]
push ebx
push esi
call fcn.0041d195
push ebx
push ebx
mov ecx, edi
call fcn.0041de81
push eax
lea ecx, [ebp - 0x38]
call fcn.0041d81e
cmp eax, 0xffffffff
jne 0x41404d
lea ecx, [ebp - 0x38]
call fcn.0041d05e
jmp 0x414128
push ebx
push eax
jmp 0x413f65
cmp eax, 6
jne 0x4140d5
lea ecx, [ebp - 0x68]
call fcn.0041cf28
lea ecx, [ebp - 0x5c]
mov dword [ebp - 0x18], ebx
call fcn.0041cf28
push dword [ebp - 0x18]
lea ecx, [ebp - 0x38]
call fcn.0041db35
test al, al
je 0x4140b7
lea eax, [ebp - 0x68]
lea ecx, [ebp - 0x38]
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.0041da92
mov ecx, edi
call fcn.0041de81
push eax
lea ecx, [ebp - 0x68]
call fcn.0041ddc0
test al, al
jne 0x41406c
lea eax, [ebp - 0x68]
lea ecx, [ebp - 0x5c]
push eax
call fcn.0041d213
push ebx
push esi
lea ecx, [ebp - 0x5c]
call fcn.0041d195
jmp 0x41406c
lea eax, [ebp - 0x5c]
lea ecx, [ebp - 0x38]
push eax
call fcn.0041d0e3
lea ecx, [ebp - 0x5c]
call fcn.0041d05e
lea ecx, [ebp - 0x68]
call fcn.0041d05e
jmp 0x4140f7
cmp eax, 7
jne 0x4140f7
mov ecx, dword [ebp - 8]
push 1
push ebx
push ebx
call fcn.0041de81
push eax
mov ecx, edi
call fcn.0041de81
push eax
lea ecx, [ebp - 0x38]
call fcn.0041dd5c
mov ecx, dword [ebp - 0xc]
call fcn.0041de81
push eax
lea ecx, [ebp - 0x38]
call fcn.0041df71
lea ecx, [ebp - 0x38]
call fcn.0041d05e
cmp dword [ebp - 0x20], ebx
jle 0x414128
mov eax, dword [ebp - 0x1c]
push ebx
cdq
idiv dword [ebp - 0x20]
mov ecx, 0x47f9a0
push eax
call fcn.00415ba7
lea ecx, [ebp - 0x44]
call fcn.0041d05e
inc dword [ebp - 0x10]
add dword [ebp - 0x1c], 0x64
mov eax, dword [ebp - 0x10]
cmp eax, dword [0x47f5c8]
jl 0x413d70
pop edi
pop esi
mov al, 1
pop ebx
leave
ret