Function at 0x41d980
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x34
mov eax, dword [esp + 0x38]
push ebx
push ebp
mov ebp, dword [sym.imp.MSVCRT.dll_fseek]
push esi
mov ebx, ecx
mov ecx, dword [0x659a18]
xor esi, esi
push edi
push esi
push eax
push ecx
call ebp
mov edx, dword [0x659a18]
mov edi, dword [sym.imp.MSVCRT.dll_fread]
push edx
lea eax, [ebx + 0x1d0]
push 1
push 2
push eax
call edi
mov eax, dword [0x659a18]
push 1
push 1
push eax
call ebp
mov ecx, dword [0x659a18]
lea edx, [ebx + 0x1d3]
push ecx
push 1
push 1
push edx
call edi
mov eax, dword [0x659a18]
lea ecx, [esp + 0x6c]
push eax
push 2
push 4
push ecx
call edi
mov edx, dword [0x659a18]
add esp, 0x48
lea eax, [esp + 0x24]
push edx
push 2
push 4
push eax
call edi
mov dword [ebx + 0x1ec], esi
mov dword [ebx + 0x1f0], esi
mov dword [ebx + 0x1f4], esi
mov dword [ebx + 0x1f8], esi
mov ecx, dword [0x659a18]
push ecx
call dword [sym.imp.MSVCRT.dll_ftell]
mov ecx, eax
mov eax, dword [esp + 0x48]
add esp, 0x14
cmp eax, esi
mov dword [esp + 0x20], ecx
jne 0x41da6c
mov eax, dword [esp + 0x38]
cmp eax, esi
jne 0x41db89
mov eax, dword [esp + 0x24]
cmp eax, esi
jne 0x41dbf8
cmp dword [esp + 0x28], esi
jne 0x41dbf8
mov eax, dword [ebx + 8]
pop edi
or al, 4
pop esi
mov dword [ebx + 8], eax
pop ebp
mov eax, ecx
pop ebx
add esp, 0x34
ret 4
mov edx, dword [0x659a18]
push esi
push eax
push edx
call ebp
mov eax, dword [0x659a18]
lea ecx, [esp + 0x38]
push eax
push 1
push 8
push ecx
call edi
mov edx, dword [esp + 0x4c]
mov eax, dword [0x659a18]
push esi
push edx
push eax
call ebp
mov eax, dword [esp + 0x54]
add esp, 0x28
cmp eax, 2
mov dword [esp + 0x48], 2
jg 0x41daae
mov dword [esp + 0x48], eax
mov ecx, dword [0x659a18]
mov edx, dword [esp + 0x48]
push ecx
push edx
lea eax, [esp + 0x44]
push 4
push eax
call edi
movsx eax, word [ebx + 0x14]
movsx ecx, word [ebx + 0x10]
lea esi, [ebx + 0x10]
sub eax, ecx
add esp, 0x10
inc eax
movsx ecx, word [esi + 6]
movsx edx, word [esi + 2]
sub ecx, edx
or al, 1
inc ecx
or ecx, 1
push ecx
push eax
movsx eax, word [ebx + 0x12]
movsx ecx, word [esi]
push eax
push ecx
lea ecx, [esp + 0x28]
call fcn.004b4a60
mov edx, dword [eax]
mov dword [esi], edx
mov eax, dword [eax + 4]
mov dword [esi + 4], eax
movsx ecx, word [esi + 6]
movsx edx, word [esi + 2]
movsx eax, word [esi + 4]
sub ecx, edx
inc ecx
push ecx
movsx ecx, word [esi]
sub eax, ecx
lea ecx, [esp + 0x14]
inc eax
push eax
push 0
push 0
call fcn.004b4a60
mov edx, dword [eax]
mov dword [ebx + 0x34], edx
mov eax, dword [eax + 4]
mov dword [ebx + 0x38], eax
mov eax, dword [esp + 0x48]
test eax, eax
jle 0x41db81
lea ecx, [esp + 0x3c]
mov dword [esp + 0x18], eax
mov dword [esp + 0x48], ecx
lea ecx, [ebx + 0x1d4]
mov dword [esp + 0x10], ecx
mov edx, dword [esp + 0x48]
mov eax, dword [edx]
test eax, eax
je 0x41db60
push esi
push eax
call fcn.004bffa0
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x48]
mov eax, dword [esp + 0x18]
add ecx, 0xc
add edx, 4
dec eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x48], edx
mov dword [esp + 0x18], eax
jne 0x41db4f
mov eax, dword [esp + 0x38]
test eax, eax
je 0x41dbf4
push 0
push eax
mov eax, dword [0x659a18]
push eax
call ebp
mov ecx, dword [0x659a18]
lea edx, [esp + 0x38]
push ecx
push 1
push 8
push edx
call edi
mov eax, dword [esp + 0x4c]
mov ecx, dword [0x659a18]
push 0
push eax
push ecx
call ebp
mov esi, dword [esp + 0x54]
add esp, 0x28
cmp esi, 2
jle 0x41dbc7
mov esi, 2
mov edx, dword [0x659a18]
lea eax, [ebx + 0x1ec]
push edx
push esi
push 4
push eax
call edi
add esp, 0x10
cmp esi, 2
jge 0x41dbf4
mov ecx, 2
lea edi, [ebx + esi*4 + 0x1ec]
sub ecx, esi
xor eax, eax
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x24]
movsx ecx, word [ebx + 0x1d0]
dec ecx
je 0x41dce2
dec ecx
je 0x41dc76
dec ecx
jne 0x41dd4c
test eax, eax
je 0x41dc38
push 0x1c
call fcn.00470250
add esp, 4
test eax, eax
je 0x41dc30
mov ecx, dword [esp + 0x24]
push ecx
mov ecx, eax
call fcn.004ba9e0
jmp 0x41dc32
xor eax, eax
mov dword [ebx + 0x1f4], eax
mov eax, dword [esp + 0x28]
test eax, eax
je 0x41dd4c
push 0x1c
call fcn.00470250
add esp, 4
test eax, eax
je 0x41dd44
mov edx, dword [esp + 0x28]
mov ecx, eax
push edx
call fcn.004ba9e0
pop edi
pop esi
mov dword [ebx + 0x1f8], eax
mov eax, dword [esp + 0x18]
pop ebp
pop ebx
add esp, 0x34
ret 4
test eax, eax
je 0x41dca1
push 0x298
call fcn.00470250
add esp, 4
test eax, eax
je 0x41dc99
mov ecx, dword [esp + 0x24]
push ecx
mov ecx, eax
call fcn.004baf10
jmp 0x41dc9b
xor eax, eax
mov dword [ebx + 0x1f4], eax
mov eax, dword [esp + 0x28]
test eax, eax
je 0x41dd4c
push 0x298
call fcn.00470250
add esp, 4
test eax, eax
je 0x41dd44
mov edx, dword [esp + 0x28]
mov ecx, eax
push edx
call fcn.004baf10
pop edi
pop esi
mov dword [ebx + 0x1f8], eax
mov eax, dword [esp + 0x18]
pop ebp
pop ebx
add esp, 0x34
ret 4
test eax, eax
je 0x41dd0c
push 0x24
call fcn.00470250
add esp, 4
test eax, eax
je 0x41dd04
mov ecx, dword [esp + 0x24]
push 0
push ecx
mov ecx, eax
call fcn.004bac90
jmp 0x41dd06
xor eax, eax
mov dword [ebx + 0x1f4], eax
mov eax, dword [esp + 0x28]
test eax, eax
je 0x41dd4c
push 0x24
call fcn.00470250
add esp, 4
test eax, eax
je 0x41dd44
mov edx, dword [esp + 0x28]
push 0
push edx
mov ecx, eax
call fcn.004bac90
pop edi
pop esi
mov dword [ebx + 0x1f8], eax
mov eax, dword [esp + 0x18]
pop ebp
pop ebx
add esp, 0x34
ret 4
xor eax, eax
mov dword [ebx + 0x1f8], eax
mov eax, dword [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret 4