Function at 0x40bf40
Capabilities:
Get file size
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x43a4bb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x23c
mov eax, dword [0x449260]
push ebp
push edi
mov dword [esp + 0x240], eax
mov dword [esp + 0x14], ecx
xor ebp, ebp
xor eax, eax
mov word [esp + 0x38], bp
mov ecx, 0x81
lea edi, [esp + 0x3a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x104
lea eax, [esp + 0x3c]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [esp + 0x38]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea edx, [esp + 0x38]
push edx
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
mov eax, dword [esp + 0x254]
push eax
lea ecx, [esp + 0x3c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push ebp
push 0x80
push 3
push ebp
push 1
push closesocket
lea edx, [esp + 0x50]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [esp + 0xc], eax
je 0x40c19b
push ebx
push esi
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
lea edi, [esi + 2]
push edi
call fcn.0042cc63
mov ebx, eax
add esp, 4
cmp ebx, ebp
mov dword [esp + 0x18], ebx
je 0x40c18e
mov ecx, edi
mov edx, ecx
shr ecx, 2
xor eax, eax
mov edi, ebx
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
push ebp
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x40]
push eax
push esi
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
xor eax, eax
cmp esi, ebp
jbe 0x40c045
mov dl, byte [eax + ebx]
not dl
mov byte [eax + ebx], dl
inc eax
cmp eax, esi
jb 0x40c038
mov dx, word [ebx]
lea ecx, [esp + 0x10]
xor eax, eax
mov byte [esp + 0x10], 0xff
mov byte [esp + 0x11], 0xfe
cmp dx, word [ecx]
jne 0x40c062
mov eax, 2
lea esi, [eax + ebx]
cmp word [esi], bp
je 0x40c185
mov edi, edi
xor eax, eax
mov ax, word [esi]
push eax
call fcn.004190ab
add esp, 4
test eax, eax
jne 0x40c08a
add esi, 2
cmp word [esi], bp
jne 0x40c070
mov ax, word [esi]
cmp ax, bp
je 0x40c185
cmp ax, 0x23
jne 0x40c0ae
lea esp, [esp]
mov cx, word [esi]
add esi, 2
cmp cx, 0xa
jne 0x40c0a0
jmp 0x40c065
mov edi, esi
cmp word [esi], 0x2c
je 0x40c0c0
add esi, 2
cmp word [esi], bp
jne 0x40c0b0
jmp 0x40c0e1
mov word [esi], bp
mov ax, word [esi + 2]
add esi, 2
cmp ax, bp
je 0x40c0e1
nop
add esi, 2
cmp ax, 0x22
je 0x40c0e1
mov ax, word [esi]
cmp ax, bp
jne 0x40c0d0
cmp word [esi], bp
mov ebx, esi
je 0x40c0fe
cmp word [esi], 0x22
je 0x40c0f8
add esi, 2
cmp word [esi], bp
jne 0x40c0e8
jmp 0x40c0fe
mov word [esi], bp
add esi, 2
push edi
mov dword [esp + 0x3c], 7
mov dword [esp + 0x38], ebp
mov word [esp + 0x28], bp
call fcn.00416f06
add esp, 4
push eax
push edi
lea ecx, [esp + 0x28]
call fcn.00401a30
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x20]
push edx
mov dword [esp + 0x258], ebp
call fcn.0040bdb0
push ebx
mov edi, eax
call fcn.00416f06
add esp, 4
push eax
push ebx
mov ecx, edi
call fcn.00401a30
cmp dword [esp + 0x38], 8
mov dword [esp + 0x254], 0xffffffff
jb 0x40c16b
mov eax, dword [esp + 0x24]
push eax
call fcn.0042cc68
add esp, 4
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x38], 7
mov dword [esp + 0x34], ebp
mov word [esp + 0x24], bp
jmp 0x40c065
push ebx
call fcn.0042cc68
add esp, 4
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
pop ebx
mov ecx, dword [esp + 0x244]
pop edi
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x23c]
mov al, 1
pop ebp
call fcn.00417c0f
add esp, 0x248
ret 4