Function at 0x401050
Capabilities:
Get file size
Print debug messages
Read file on windows

Disassembly:
sub esp, 0x76c
mov eax, dword [0x458e40]
push ebx
mov ebx, dword [esp + 0x774]
push ebp
push esi
push edi
xor ebp, ebp
push ebp
push 0x8000003
push 3
push ebp
mov dword [esp + 0x788], eax
xor eax, eax
push 1
mov ecx, 0x41
lea edi, [esp + 0x180]
rep stosd dword es:[edi], eax
push 0x80000000
mov ecx, 0x41
lea edi, [esp + 0x388]
push ebx
mov dword [esp + 0x34], ebp
mov dword [esp + 0x3c], ebp
rep stosd dword es:[edi], eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x4010f1
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, dword [esp + 0x784]
push eax
mov dword [ebp], eax
call fcn.004255e0
mov ecx, dword [ebp]
add esp, 4
push 0
mov edi, eax
lea eax, [esp + 0x18]
push eax
push ecx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
jmp 0x4014ff
push 0x104
lea edx, [esp + 0x678]
push edx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
call ebp
lea eax, [esp + 0x574]
push eax
lea ecx, [esp + 0x70]
push ecx
lea edx, [esp + 0x278]
push edx
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x684]
push ecx
call fcn.00433184
lea eax, [esp + 0x24]
add esp, 0x14
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401137
lea edi, [esp + 0x16c]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x401148
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [esp + 0x270]
rep movsb byte es:[edi], byte [esi]
mov ecx, eax
lea esp, [esp]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x401170
lea edi, [esp + 0x16c]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x401183
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x16c]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4011a1
mov edx, dword [str.ijt2.dat]
mov eax, dword [0x44136c]
mov cl, byte [0x441370]
mov dword [edi], edx
push 0x104
lea edx, [esp + 0x678]
push edx
mov dword [edi + 4], eax
push 0
mov byte [edi + 8], cl
call ebp
lea eax, [esp + 0x574]
push eax
lea ecx, [esp + 0x70]
push ecx
lea edx, [esp + 0x278]
push edx
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x684]
push ecx
call fcn.00433184
lea eax, [esp + 0x24]
add esp, 0x14
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x401203
lea edi, [esp + 0x370]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x401216
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [esp + 0x270]
rep movsb byte es:[edi], byte [esi]
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x401235
lea edi, [esp + 0x370]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x401248
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
mov eax, ebx
rep movsb byte es:[edi], byte [esi]
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x401262
lea edi, [esp + 0x370]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x401275
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea edx, [esp + 0x574]
push edx
lea eax, [esp + 0x70]
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x278]
push ecx
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x380]
push eax
call fcn.00433184
add esp, 0x14
push 0
push 0x8000001
push 3
push 0
push 1
push 0x80000000
lea ecx, [esp + 0x184]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
mov dword [esp + 0x24], esi
jne 0x401314
push ebx
lea edx, [esp + 0x170]
push edx
lea eax, [esp + 0x47c]
push 0x441348
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea ecx, [esp + 0x474]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor eax, eax
jmp 0x4014ff
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea edx, [esp + 0x18]
push edx
push 0x20
lea eax, [esp + 0x34]
push eax
push esi
call edi
mov ecx, dword [esp + 0x28]
imul ecx, ecx, 0x110
push ecx
call fcn.004255e0
mov ebp, eax
mov eax, dword [esp + 0x2c]
imul eax, eax, 0x110
add esp, 4
push 0
lea edx, [esp + 0x18]
push edx
push eax
push ebp
push esi
mov dword [esp + 0x30], ebp
call edi
xor ebx, ebx
lea esp, [esp]
mov ecx, dword [esp + 0x780]
push ecx
push ebp
call fcn.0043311b
add esp, 8
test eax, eax
je 0x401386
mov eax, dword [esp + 0x28]
inc ebx
add ebp, 0x110
cmp ebx, eax
jbe 0x401360
jmp 0x4013a5
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x1c]
mov edx, ebx
imul edx, edx, 0x110
cmp ebx, ecx
mov eax, dword [edx + eax + 0x104]
jbe 0x401483
lea eax, [esp + 0x574]
mov edx, eax
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4013b0
lea edi, [esp + 0x6c]
sub eax, edx
dec edi
mov edi, edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4013c0
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x6c]
dec edi
lea ecx, [ecx]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4013e0
mov ecx, dword [str..pr3]
mov dl, byte [0x441344]
mov ebx, dword [esp + 0x1c]
mov dword [edi], ecx
mov byte [edi + 4], dl
xor esi, esi
mov edi, ebx
lea eax, [esp + 0x6c]
push eax
push edi
call fcn.0043311b
add esp, 8
test eax, eax
je 0x401424
mov eax, dword [esp + 0x28]
inc esi
add edi, 0x110
cmp esi, eax
jbe 0x401401
jmp 0x40143d
mov ecx, esi
imul ecx, ecx, 0x110
mov eax, dword [ecx + ebx + 0x104]
cmp esi, dword [esp + 0x28]
jbe 0x401479
mov ebx, dword [esp + 0x1c]
mov edx, dword [esp + 0x780]
push edx
lea eax, [esp + 0x478]
push 0x441324
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea ecx, [esp + 0x474]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push ebx
call fcn.00433116
add esp, 4
xor eax, eax
jmp 0x4014ff
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, dword [esp + 0x24]
push 0
push 0
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea edx, [esp + 0x18]
push edx
push 0x24
lea eax, [esp + 0x54]
push eax
push esi
call edi
mov ecx, dword [esp + 0x58]
push ecx
call fcn.004255e0
lea edx, [esp + 0x70]
push 0x44131c
push edx
mov ebx, eax
call fcn.00433090
add esp, 0xc
test eax, eax
je 0x401518
mov ecx, dword [esp + 0x5c]
push 0
lea eax, [esp + 0x18]
push eax
push ecx
push ebx
push esi
call edi
mov ebp, dword [esp + 0x24]
push ebp
call fcn.00433116
mov ecx, dword [esp + 0x20]
push ecx
call fcn.00433116
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x58]
mov edx, dword [esp + 0x784]
mov dword [edx], eax
mov eax, ebx
mov ecx, dword [esp + 0x778]
pop edi
pop esi
pop ebp
pop ebx
call fcn.004332fd
add esp, 0x76c
ret 0xc
mov edx, dword [esp + 0x5c]
push edx
call fcn.004255e0
mov ecx, dword [esp + 0x60]
add esp, 4
push 0
mov ebp, eax
lea eax, [esp + 0x18]
push eax
push ecx
push ebp
push esi
call edi
mov ecx, 0x404
xor eax, eax
mov edi, 0x45ffe8
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
mov ecx, 0xfee
mov word [0x45ddd8], 0
jmp 0x401560
shr word [0x45ddd8], 1
mov eax, dword [0x45ddd8]
test ah, 1
mov edx, dword [esp + 0x5c]
mov edi, dword [esp + 0x20]
jne 0x401591
cmp edi, edx
jae 0x4014d6
movzx eax, byte [edi + ebp]
inc edi
or eax, 0xff00
mov word [0x45ddd8], ax
test byte [0x45ddd8], 1
je 0x4015c9
cmp edi, edx
jae 0x4014d6
movzx eax, byte [edi + ebp]
mov edx, dword [esp + 0x18]
inc edi
mov byte [ebx + edx], al
inc edx
mov dword [esp + 0x18], edx
movzx edx, cx
inc ecx
mov dword [esp + 0x20], edi
mov byte [edx + 0x45ffe8], al
and ecx, 0xfff
jmp 0x401560
cmp edi, edx
jae 0x4014d6
movzx edx, byte [edi + ebp]
mov eax, dword [esp + 0x5c]
inc edi
cmp edi, eax
jae 0x4014d6
movzx ax, byte [edi + ebp]
inc edi
mov dword [esp + 0x20], edi
mov esi, eax
and esi, 0xf0
shl esi, 4
or edx, esi
and eax, 0xf
add eax, 3
movzx esi, ax
mov edi, dword [esp + 0x18]
mov eax, edx
and eax, 0xfff
movzx eax, byte [eax + 0x45ffe8]
inc edi
mov byte [ebx + edi - 1], al
mov dword [esp + 0x18], edi
movzx edi, cx
inc ecx
and ecx, 0xfff
inc edx
dec esi
mov byte [edi + 0x45ffe8], al
jne 0x401602
mov esi, dword [esp + 0x24]
jmp 0x401560