Function at 0x402e92
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9c0
push edi
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + eax*4 + 4]
mov dword [ebp - 0x4dc], edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov dword [ebp - 0x5c], ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x14]
mov dword [ebp - 4], eax
mov dword [ebp - 0x4d8], 0
mov byte [ebp - 0x4cc], 0
mov ecx, 0x11b
xor eax, eax
lea edi, [ebp - 0x4cb]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov byte [ebp - 0x50], 0
mov byte [ebp - 0x58], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x540], 0
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x4d4], 0
mov dword [ebp - 8], 0
mov byte [ebp - 0x53c], 0
mov ecx, 0x16
xor eax, eax
lea edi, [ebp - 0x53b]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov dword [ebp - 0x4e0], 0
mov ecx, dword [ebp - 0x4dc]
mov dword [ebp - 0x4d0], ecx
cmp dword [ebp + 8], 0
je 0x402f68
mov edx, dword [ebp + 8]
cmp dword [edx + 0x18], 0
je 0x402f68
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x10]
push ecx
push 0
push 0
push 0x80
mov edx, dword [ebp + 8]
call dword [edx + 0x18]
add esp, 0x10
mov eax, dword [ebp + 0xc]
mov dword [ebp + 0xc], eax
push 0x320
push 0x40
lea ecx, [ebp - 0x4cc]
push ecx
mov edx, dword [ebp - 0x5c]
push edx
call fcn.004051b3
add esp, 0x10
test eax, eax
jge 0x402fa7
cmp dword [ebp + 0xc], 0
jne 0x402f9b
mov dword [ebp - 0x54], 0xfffffff6
jmp 0x402fa2
mov dword [ebp - 0x54], 0
jmp 0x40390b
cmp dword [ebp + 0x14], 0
je 0x403067
mov byte [ebp - 0x9bf], 4
mov word [ebp - 0x9be], 0
push 0x470
push 0
lea eax, [ebp - 0x9b1]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0x47f
lea ecx, [ebp - 0x9c0]
push ecx
call fcn.00405250
add esp, 8
mov byte [ebp - 0x541], al
mov dword [ebp - 0x54], 0
cmp dword [ebp - 0x54], 0
jne 0x403021
push 0x5dc0
lea edx, [ebp - 0x9c0]
push edx
mov eax, dword [ebp - 0x5c]
push eax
call fcn.0040509a
add esp, 0xc
test eax, eax
jge 0x403021
mov dword [ebp - 0x54], 0xfffffff6
cmp dword [ebp - 0x54], 0
jne 0x403047
push 0x5dc0
lea ecx, [ebp - 0x4c]
push ecx
mov edx, dword [ebp - 0x5c]
push edx
call fcn.004050d6
add esp, 0xc
test eax, eax
jge 0x403047
mov dword [ebp - 0x54], 0xfffffff6
push 0x64
call fcn.00402ac0
add esp, 4
xor eax, eax
test eax, eax
jne 0x402fb1
mov dword [ebp - 0x54], 0
jmp 0x403909
lea ecx, [ebp - 0x4cc]
push ecx
lea edx, [ebp - 0x53c]
push edx
call fcn.00402c0b
add esp, 8
cmp dword [ebp + 8], 0
je 0x4030ac
mov eax, dword [ebp + 8]
cmp dword [eax + 0x18], 0
je 0x4030ac
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
lea ecx, [ebp - 0x53c]
push ecx
push 0x81
mov edx, dword [ebp + 8]
call dword [edx + 0x18]
add esp, 0x10
push 0x480
push 0
lea eax, [ebp - 0x9c0]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
mov byte [ebp - 0x9c0], 0xac
mov cx, word [ebp + 0xc]
mov word [ebp - 0x9bc], cx
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + edx*4 + 4]
mov dword [ebp - 0x4dc], ecx
cmp dword [ebp - 0x4dc], 0
je 0x403125
mov edx, dword [ebp - 4]
and edx, 0x20000
test edx, edx
jne 0x4032a2
push 0x408684
mov eax, dword [ebp - 0x4dc]
push eax
call sub.MSVCRT.dll_fopen
add esp, 8
mov dword [ebp - 0x4d8], eax
cmp dword [ebp - 0x4d8], 0
jne 0x4032a2
mov ecx, dword [ebp - 4]
and ecx, 0x40000
test ecx, ecx
je 0x4031ec
mov byte [ebp - 0x9bf], 4
mov word [ebp - 0x9be], 0
push 0x470
push 0
lea edx, [ebp - 0x9b1]
push edx
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0x47f
lea eax, [ebp - 0x9c0]
push eax
call fcn.00405250
add esp, 8
mov byte [ebp - 0x541], al
mov dword [ebp - 0x54], 0
cmp dword [ebp - 0x54], 0
jne 0x4031a6
push 0x5dc0
lea ecx, [ebp - 0x9c0]
push ecx
mov edx, dword [ebp - 0x5c]
push edx
call fcn.0040509a
add esp, 0xc
test eax, eax
jge 0x4031a6
mov dword [ebp - 0x54], 0xfffffff6
cmp dword [ebp - 0x54], 0
jne 0x4031cc
push 0x5dc0
lea eax, [ebp - 0x4c]
push eax
mov ecx, dword [ebp - 0x5c]
push ecx
call fcn.004050d6
add esp, 0xc
test eax, eax
jge 0x4031cc
mov dword [ebp - 0x54], 0xfffffff6
push 0x64
call fcn.00402ac0
add esp, 4
xor edx, edx
test edx, edx
jne 0x403136
mov dword [ebp - 0x54], 0xfffffff0
jmp 0x403907
mov byte [ebp - 0x9bf], 4
mov word [ebp - 0x9be], 0
push 0x470
push 0
lea eax, [ebp - 0x9b1]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0x47f
lea ecx, [ebp - 0x9c0]
push ecx
call fcn.00405250
add esp, 8
mov byte [ebp - 0x541], al
mov dword [ebp - 0x54], 0
cmp dword [ebp - 0x54], 0
jne 0x40325c
push 0x5dc0
lea edx, [ebp - 0x9c0]
push edx
mov eax, dword [ebp - 0x5c]
push eax
call fcn.0040509a
add esp, 0xc
test eax, eax
jge 0x40325c
mov dword [ebp - 0x54], 0xfffffff6
cmp dword [ebp - 0x54], 0
jne 0x403282
push 0x5dc0
lea ecx, [ebp - 0x4c]
push ecx
mov edx, dword [ebp - 0x5c]
push edx
call fcn.004050d6
add esp, 0xc
test eax, eax
jge 0x403282
mov dword [ebp - 0x54], 0xfffffff6
push 0x64
call fcn.00402ac0
add esp, 4
xor eax, eax
test eax, eax
jne 0x4031ec
mov dword [ebp - 0x54], 0
jmp 0x403905
mov ecx, dword [ebp - 4]
and ecx, 0x20000
test ecx, ecx
jne 0x40330b
push 2
push 0
mov edx, dword [ebp - 0x4d8]
push edx
call sub.MSVCRT.dll_fseek
add esp, 0xc
mov eax, dword [ebp - 0x4d8]
push eax
call sub.MSVCRT.dll_ftell
add esp, 4
sub eax, 0x80
mov dword [ebp - 8], eax
push 0
push 0
mov ecx, dword [ebp - 0x4d8]
push ecx
call sub.MSVCRT.dll_fseek
add esp, 0xc
mov edx, dword [ebp - 0x4d8]
push edx
push 1
push 0x80
lea eax, [ebp - 0x4cc]
push eax
call sub.MSVCRT.dll_fread
add esp, 0x10
jmp 0x40335d
mov ecx, dword [ebp - 0x4dc]
mov edx, dword [ecx]
mov dword [ebp - 8], edx
mov eax, dword [ebp - 0x4dc]
add eax, 4
mov dword [ebp - 0x4dc], eax
push 0x80
mov ecx, dword [ebp - 0x4dc]
push ecx
lea edx, [ebp - 0x4cc]
push edx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov eax, dword [ebp - 0x4dc]
add eax, 0x80
mov dword [ebp - 0x4dc], eax
mov ecx, dword [ebp - 8]
sub ecx, 0x80
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 0x4cc]
and edx, 0xff
cmp edx, 0xca
jne 0x4033af
mov eax, dword [ebp - 0x4cb]
and eax, 0xff
cmp eax, 0xab
jne 0x4033af
mov ecx, dword [ebp - 0x4ca]
and ecx, 0xff
cmp ecx, 0xba
jne 0x4033af
mov edx, dword [ebp - 0x4c9]
and edx, 0xff
cmp edx, 0xac
je 0x403465
mov byte [ebp - 0x9bf], 4
mov word [ebp - 0x9be], 0
push 0x470
push 0
lea eax, [ebp - 0x9b1]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0x47f
lea ecx, [ebp - 0x9c0]
push ecx
call fcn.00405250
add esp, 8
mov byte [ebp - 0x541], al
mov dword [ebp - 0x54], 0
cmp dword [ebp - 0x54], 0
jne 0x40341f
push 0x5dc0
lea edx, [ebp - 0x9c0]
push edx
mov eax, dword [ebp - 0x5c]
push eax
call fcn.0040509a
add esp, 0xc
test eax, eax
jge 0x40341f
mov dword [ebp - 0x54], 0xfffffff6
cmp dword [ebp - 0x54], 0
jne 0x403445
push 0x5dc0
lea ecx, [ebp - 0x4c]
push ecx
mov edx, dword [ebp - 0x5c]
push edx
call fcn.004050d6
add esp, 0xc
test eax, eax
jge 0x403445
mov dword [ebp - 0x54], 0xfffffff6
push 0x64
call fcn.00402ac0
add esp, 4
xor eax, eax
test eax, eax
jne 0x4033af
mov dword [ebp - 0x54], 0xfffffffd
jmp 0x403903
lea ecx, [ebp - 0x4c8]
mov dword [ebp - 0x4e0], ecx
mov edx, dword [ebp - 0x4e0]
xor eax, eax
mov ax, word [edx]
mov ecx, dword [ebp - 0x4e0]
lea edx, [ecx + eax*2]
mov dword [ebp - 0x4e0], edx
mov eax, dword [ebp - 0x4e0]
xor ecx, ecx
mov cx, word [eax + 2]
sar ecx, 8
and ecx, 0xff
mov byte [ebp - 0x50], cl
mov edx, dword [ebp - 0x4e0]
xor eax, eax
mov ax, word [edx]
cmp eax, 0xfeed
je 0x4034c8
mov ecx, dword [ebp - 0x4e0]
xor edx, edx
mov dx, word [ecx]
cmp edx, 0xbeef
jne 0x4034cd
jmp 0x403583
mov byte [ebp - 0x9bf], 4
mov word [ebp - 0x9be], 0
push 0x470
push 0
lea eax, [ebp - 0x9b1]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0x47f
lea ecx, [ebp - 0x9c0]
push ecx
call fcn.00405250
add esp, 8
mov byte [ebp - 0x541], al
mov dword [ebp - 0x54], 0
cmp dword [ebp - 0x54], 0
jne 0x40353d
push 0x5dc0
lea edx, [ebp - 0x9c0]
push edx
mov eax, dword [ebp - 0x5c]
push eax
call fcn.0040509a
add esp, 0xc
test eax, eax
jge 0x40353d
mov dword [ebp - 0x54], 0xfffffff6
cmp dword [ebp - 0x54], 0
jne 0x403563
push 0x5dc0
lea ecx, [ebp - 0x4c]
push ecx
mov edx, dword [ebp - 0x5c]
push edx
call fcn.004050d6
add esp, 0xc
test eax, eax
jge 0x403563
mov dword [ebp - 0x54], 0xfffffff6
push 0x64
call fcn.00402ac0
add esp, 4
xor eax, eax
test eax, eax
jne 0x4034cd
mov dword [ebp - 0x54], 0xfffffff5
jmp 0x403901
cmp dword [ebp + 8], 0
je 0x4035ab
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x18], 0
je 0x4035ab
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x10]
push eax
push 0
push 0
push 0x82
mov ecx, dword [ebp + 8]
call dword [ecx + 0x18]
add esp, 0x10
mov byte [ebp - 0x9bf], 1
mov word [ebp - 0x9be], 1
lea edx, [ebp - 0x9b1]
push edx
mov eax, dword [ebp - 8]
push eax
call fcn.00402bcf
add esp, 8
push 0x7c
lea ecx, [ebp - 0x4c8]
push ecx
lea edx, [ebp - 0x9ad]
push edx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov dword [ebp - 0xc], 0
mov eax, dword [ebp - 8]
mov dword [ebp - 0x540], eax
mov dword [ebp - 0x54], 0
mov ecx, dword [ebp - 0x4dc]
add ecx, dword [ebp - 8]
mov dword [ebp - 0x4d0], ecx
cmp dword [ebp - 0x540], 0
jl 0x4037f0
mov edx, dword [ebp + 0x10]
cmp dword [edx], 0
jne 0x4037f0
push 0x47f
lea eax, [ebp - 0x9c0]
push eax
call fcn.00405250
add esp, 8
mov byte [ebp - 0x541], al
push 0x5dc0
lea ecx, [ebp - 0x9c0]
push ecx
mov edx, dword [ebp - 0x5c]
push edx
call fcn.0040509a
add esp, 0xc
test eax, eax
jge 0x403667
mov dword [ebp - 0x54], 0xfffffff6
jmp 0x4038ff
push 0x5dc0
lea eax, [ebp - 0x4c]
push eax
mov ecx, dword [ebp - 0x5c]
push ecx
call fcn.004050d6
add esp, 0xc
test eax, eax
jge 0x40368c
mov dword [ebp - 0x54], 0xfffffff6
jmp 0x4038fd
mov edx, dword [ebp - 0x4b]
and edx, 0xff
test edx, edx
jne 0x4037de
mov eax, dword [ebp - 0x9be]
and eax, 0xffff
cmp eax, 1
jne 0x4036d9
cmp dword [ebp + 8], 0
je 0x4036d9
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x18], 0
je 0x4036d9
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x10]
push eax
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp + 0xc]
push edx
push 0x83
mov eax, dword [ebp + 8]
call dword [eax + 0x18]
add esp, 0x10
mov byte [ebp - 0x9c0], 0xac
mov byte [ebp - 0x9bf], 2
mov cx, word [ebp - 0x9be]
add cx, 1
mov word [ebp - 0x9be], cx
cmp dword [ebp - 0x540], 0
jg 0x403707
jmp 0x4037f0
cmp dword [ebp - 0x540], 0x470
jle 0x40371c
mov dword [ebp - 0xc], 0x470
jmp 0x40373b
push 0x470
push 0
lea edx, [ebp - 0x9b1]
push edx
call sub.MSVCRT.dll_memset
add esp, 0xc
mov eax, dword [ebp - 0x540]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 4]
and ecx, 0x20000
test ecx, ecx
jne 0x403766
mov edx, dword [ebp - 0x4d8]
push edx
push 1
mov eax, dword [ebp - 0xc]
push eax
lea ecx, [ebp - 0x9b1]
push ecx
call sub.MSVCRT.dll_fread
add esp, 0x10
jmp 0x40378f
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 0x4dc]
push eax
lea ecx, [ebp - 0x9b1]
push ecx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov edx, dword [ebp - 0x4dc]
add edx, dword [ebp - 0xc]
mov dword [ebp - 0x4dc], edx
mov eax, dword [ebp - 0x4d4]
add eax, dword [ebp - 0xc]
mov dword [ebp - 0x4d4], eax
mov ecx, dword [ebp - 0x540]
sub ecx, dword [ebp - 0xc]
mov dword [ebp - 0x540], ecx
cmp dword [ebp + 8], 0
je 0x4037dc
mov edx, dword [ebp + 8]
cmp dword [edx + 0x18], 0
je 0x4037dc
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x10]
push ecx
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 0x4d4]
push eax
push 0x85
mov ecx, dword [ebp + 8]
call dword [ecx + 0x18]
add esp, 0x10
jmp 0x4037eb
mov edx, dword [ebp - 0x48]
neg edx
mov dword [ebp - 0x54], edx
jmp 0x4038fb
jmp 0x40360c
mov eax, dword [ebp - 0x4b]
and eax, 0xff
test eax, eax
jne 0x4038aa
mov byte [ebp - 0x9bf], 4
mov word [ebp - 0x9be], 0
push 0x470
push 0
lea ecx, [ebp - 0x9b1]
push ecx
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0x47f
lea edx, [ebp - 0x9c0]
push edx
call fcn.00405250
add esp, 8
mov byte [ebp - 0x541], al
mov dword [ebp - 0x54], 0
cmp dword [ebp - 0x54], 0
jne 0x403870
push 0x5dc0
lea eax, [ebp - 0x9c0]
push eax
mov ecx, dword [ebp - 0x5c]
push ecx
call fcn.0040509a
add esp, 0xc
test eax, eax
jge 0x403870
mov dword [ebp - 0x54], 0xfffffff6
cmp dword [ebp - 0x54], 0
jne 0x403896
push 0x5dc0
lea edx, [ebp - 0x4c]
push edx
mov eax, dword [ebp - 0x5c]
push eax
call fcn.004050d6
add esp, 0xc
test eax, eax
jge 0x403896
mov dword [ebp - 0x54], 0xfffffff6
push 0x64
call fcn.00402ac0
add esp, 4
xor ecx, ecx
test ecx, ecx
jne 0x403800
cmp dword [ebp - 0x4d8], 0
je 0x4038c2
mov edx, dword [ebp - 0x4d8]
push edx
call sub.MSVCRT.dll_fclose
add esp, 4
mov dword [ebp - 0x4d8], 0
cmp dword [ebp + 8], 0
je 0x4038f6
mov eax, dword [ebp + 8]
cmp dword [eax + 0x18], 0
je 0x4038f6
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x10]
push edx
push 0
mov eax, dword [ebp - 0x54]
push eax
push 0x86
mov ecx, dword [ebp + 8]
call dword [ecx + 0x18]
add esp, 0x10
mov eax, dword [ebp - 0x54]
jmp 0x40390d
jmp 0x4038aa
jmp 0x4038aa
jmp 0x4038aa
jmp 0x4038aa
jmp 0x4038aa
jmp 0x4038aa
jmp 0x4038aa
jmp 0x4038aa
jmp 0x4038aa
pop edi
mov esp, ebp
pop ebp
ret