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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44d260
mov eax, dword fs:[0]
push eax
sub esp, 0x80
mov eax, dword [0x46b074]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov dword [ebp - 0x88], esi
mov eax, ecx
mov dword [ebp - 0x5c], eax
cmp dword [eax + 0x50], 0
je 0x41b370
cmp dword [eax + 0x68], 0
je 0x41b370
cmp esi, 0xffffffff
je 0x41b370
mov ebx, dword [ebp + 8]
test ebx, ebx
je 0x41b370
cmp dword [0x46f1c8], 0
je 0x41b370
lea eax, [ebp - 0x64]
xorps xmm0, xmm0
push eax
push esi
movq qword [ebp - 0x64], xmm0
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x41b370
mov edi, dword [0x46f1c8]
xorps xmm0, xmm0
mov eax, edi
movlpd qword [ebp - 0x54], xmm0
shl eax, 0x14
mov dword [ebp - 0x78], eax
cmp ebx, 3
jne 0x41b043
push 0
push 0x400
push dword [ebp - 0x60]
push dword [ebp - 0x64]
call fcn.0044c320
push 0
push 0x400
push edx
push eax
call fcn.0044c320
push 0
push edi
push edx
push eax
call fcn.0044c320
push 0
push 2
push edx
push eax
call fcn.0044c320
mov ecx, dword [ebp - 0x54]
mov edi, eax
mov eax, edx
mov dword [ebp - 0x84], edi
mov edx, dword [ebp - 0x50]
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x80], ecx
jmp 0x41b077
cmp ebx, 4
jne 0x41b370
mov edi, dword [0x46f1c4]
mov dword [ebp - 0x84], edi
test edi, edi
je 0x41b370
xor eax, eax
push eax
push edi
push dword [ebp - 0x60]
mov dword [ebp - 0x58], eax
push dword [ebp - 0x64]
call fcn.0044c320
mov dword [ebp - 0x80], eax
xor eax, eax
mov ecx, edi
mov dword [ebp - 0x7c], edx
or ecx, eax
je 0x41b370
mov eax, dword [ebp - 0x78]
test eax, eax
je 0x41b370
push 0
xorps xmm0, xmm0
lea ecx, [ebp - 0x2c]
push eax
movq qword [ebp - 0x54], xmm0
call fcn.00409220
cmp dword [ebp - 0x58], 0
xorps xmm0, xmm0
mov dword [ebp - 0x48], 0
movlpd qword [ebp - 0x6c], xmm0
jl 0x41b1e4
jg 0x41b0c5
test edi, edi
je 0x41b1e4
mov ecx, dword [ebp - 0x68]
mov ebx, dword [ebp - 0x50]
mov eax, dword [ebp - 0x6c]
mov edi, dword [ebp - 0x54]
mov dword [ebp - 0x50], ecx
mov dword [ebp - 0x68], eax
mov edx, dword [ebp + 8]
cmp edx, 3
jne 0x41b0f7
push ecx
push eax
push 0
push dword [ebp - 0x78]
call fcn.00423980
mov edi, eax
mov ebx, edx
shld ebx, edi, 1
add edi, edi
jmp 0x41b10d
cmp edx, 4
jne 0x41b10d
push dword [ebp - 0x7c]
push dword [ebp - 0x80]
push ecx
push eax
call fcn.00423980
mov edi, eax
mov ebx, edx
push 0
push 0
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x41b340
cmp dword [ebp - 0x18], 0x10
lea ecx, [ebp - 0x48]
push 0
push ecx
push dword [ebp - 0x1c]
lea eax, [ebp - 0x2c]
cmovae eax, dword [ebp - 0x2c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41b340
push 0
push 0
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x41b340
mov eax, dword [ebp - 0x5c]
cmp dword [eax + 0x6c], 0x10
lea edx, [eax + 0x58]
jb 0x41b169
mov edx, dword [edx]
mov ecx, eax
call fcn.00419610
cmp dword [ebp - 0x18], 0x10
lea esi, [ebp - 0x2c]
push dword [ebp - 0x1c]
cmovae esi, dword [ebp - 0x2c]
lea edx, [ebp - 0x2c]
cmovae edx, dword [ebp - 0x2c]
push esi
call fcn.00419630
mov esi, dword [ebp - 0x88]
lea ecx, [ebp - 0x48]
add esp, 8
lea eax, [ebp - 0x2c]
cmp dword [ebp - 0x18], 0x10
cmovae eax, dword [ebp - 0x2c]
push 0
push ecx
push dword [ebp - 0x1c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41b340
mov eax, dword [ebp - 0x68]
mov ecx, dword [ebp - 0x50]
add eax, 1
mov dword [ebp - 0x68], eax
adc ecx, 0
mov dword [ebp - 0x50], ecx
cmp ecx, dword [ebp - 0x58]
jl 0x41b0d7
jg 0x41b1e1
cmp eax, dword [ebp - 0x84]
jb 0x41b0d7
mov ebx, dword [ebp + 8]
push 2
push 0
xorps xmm0, xmm0
movlpd qword [ebp - 0x54], xmm0
push dword [ebp - 0x50]
push dword [ebp - 0x54]
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x41b340
mov edx, dword [ebp - 0x5c]
lea ecx, [ebp - 0x44]
call fcn.0041a890
mov ecx, dword [ebp - 0x34]
test ecx, ecx
je 0x41b310
cmp dword [ebp - 0x30], 0x10
lea edx, [ebp - 0x48]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [ebp - 0x44]
cmovae eax, dword [ebp - 0x44]
push 0
push edx
push ecx
push eax
push esi
call edi
test eax, eax
je 0x41b310
mov eax, dword [ebp - 0x48]
cmp eax, dword [ebp - 0x34]
jne 0x41b310
mov eax, dword [ebp - 0x64]
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0x68], eax
movzx eax, byte [0x46f1c8]
mov byte [ebp - 0x6f], al
movzx eax, byte [0x46f1c4]
push 0
mov byte [ebp - 0x6e], al
lea eax, [ebp - 0x48]
push eax
push 0x10
lea eax, [ebp - 0x74]
mov byte [ebp - 0x70], bl
push eax
push esi
mov dword [ebp - 0x74], 0xd3b1d3ff
call edi
test eax, eax
je 0x41b310
cmp dword [ebp - 0x48], 0x10
jne 0x41b310
mov edx, dword [ebp - 0x30]
cmp edx, 0x10
jb 0x41b2c6
mov ecx, dword [ebp - 0x44]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x41b2bc
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x41b38e
push edx
push ecx
call fcn.00422d4e
add esp, 8
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0xf
mov byte [ebp - 0x44], 0
cmp edx, 0x10
jb 0x41b30c
mov ecx, dword [ebp - 0x2c]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x41b302
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x41b393
push edx
push ecx
call fcn.00422d4e
add esp, 8
mov al, 1
jmp 0x41b372
mov edx, dword [ebp - 0x30]
cmp edx, 0x10
jb 0x41b340
mov ecx, dword [ebp - 0x44]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x41b336
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x41b398
push edx
push ecx
call fcn.00422d4e
add esp, 8
mov edx, dword [ebp - 0x18]
cmp edx, 0x10
jb 0x41b370
mov ecx, dword [ebp - 0x2c]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x41b366
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x41b39d
push edx
push ecx
call fcn.00422d4e
add esp, 8
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00422d0d
mov esp, ebp
pop ebp
ret
call fcn.0043d6f9
call fcn.0043d6f9
call fcn.0043d6f9
call fcn.0043d6f9
int3