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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10010530
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
mov eax, dword [0x10018198]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 1
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x20], 0
push 0
push 0
push 3
push 0
push 0
push 0x80000000
lea ecx, [ebp + 8]
call fcn.10004240
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0xffffffff
je 0x100047c0
mov dword [ebp - 0x18], 0
push 0
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x10004787
mov byte [ebp - 0x24], 0
mov byte [ebp - 4], 0
lea ecx, [ebp + 8]
call fcn.10001c10
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0xc]
call fcn.10001c10
mov al, byte [ebp - 0x24]
jmp 0x10004960
mov ecx, dword [ebp - 0x20]
push ecx
call fcn.1000656c
add esp, 4
mov dword [ebp - 0x4c], eax
mov edx, dword [ebp - 0x4c]
mov dword [ebp - 0x28], edx
push 0
lea eax, [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
mov edx, dword [ebp - 0x28]
push edx
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp - 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x100047e7
mov byte [ebp - 0x22], 0
mov byte [ebp - 4], 0
lea ecx, [ebp + 8]
call fcn.10001c10
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0xc]
call fcn.10001c10
mov al, byte [ebp - 0x22]
jmp 0x10004960
mov edx, dword [ebp - 0x20]
push edx
call fcn.1000656c
add esp, 4
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x2c], 0
jmp 0x1000480e
mov ecx, dword [ebp - 0x2c]
add ecx, 1
mov dword [ebp - 0x2c], ecx
mov edx, dword [ebp - 0x2c]
cmp edx, dword [ebp - 0x20]
jae 0x1000483e
mov eax, dword [ebp - 0x2c]
cdq
idiv dword [ebp + 0x14]
mov dword [ebp - 0x44], edx
mov eax, dword [ebp - 0x28]
add eax, dword [ebp - 0x2c]
movsx ecx, byte [eax]
mov edx, dword [ebp + 0x10]
add edx, dword [ebp - 0x44]
movsx eax, byte [edx]
xor ecx, eax
mov edx, dword [ebp - 0x1c]
add edx, dword [ebp - 0x2c]
mov byte [edx], cl
jmp 0x10004805
push 0
push 0
push 2
push 0
push 0
push 0x40000000
lea ecx, [ebp + 0xc]
call fcn.10004240
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0xffffffff
je 0x10004890
mov dword [ebp - 0x14], 0
push 0
lea eax, [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0x34]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x100048e2
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x38], edx
mov eax, dword [ebp - 0x38]
push eax
call fcn.1000751f
add esp, 4
cmp dword [ebp - 0x38], 0
jne 0x100048b1
mov dword [ebp - 0x48], 0
jmp 0x100048be
mov dword [ebp - 0x1c], 0x8123
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x48], ecx
mov byte [ebp - 0x21], 0
mov byte [ebp - 4], 0
lea ecx, [ebp + 8]
call fcn.10001c10
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0xc]
call fcn.10001c10
mov al, byte [ebp - 0x21]
jmp 0x10004960
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0x40], edx
mov eax, dword [ebp - 0x40]
push eax
call fcn.1000751f
add esp, 4
cmp dword [ebp - 0x40], 0
jne 0x10004903
mov dword [ebp - 0x50], 0
jmp 0x10004910
mov dword [ebp - 0x28], 0x8123
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x50], ecx
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x3c], edx
mov eax, dword [ebp - 0x3c]
push eax
call fcn.1000751f
add esp, 4
cmp dword [ebp - 0x3c], 0
jne 0x10004931
mov dword [ebp - 0x58], 0
jmp 0x1000493e
mov dword [ebp - 0x1c], 0x8123
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x58], ecx
mov byte [ebp - 0x23], 1
mov byte [ebp - 4], 0
lea ecx, [ebp + 8]
call fcn.10001c10
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0xc]
call fcn.10001c10
mov al, byte [ebp - 0x23]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10007719
mov esp, ebp
pop ebp
ret