Function at 0x401104
Capabilities:
Read file on windows

Disassembly:
jmp 0x406e62
sub esp, 0x2c
push ebx
push ebp
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GlobalSize]
push 1
pop ebx
push dword [0x57c334]
mov dword [0xac5700], ebx
call edi
xor esi, esi
push eax
push esi
push 0x71b440
call sub.MSVCRT.dll_memset
add esp, 0xc
push dword [0xa325d4]
call edi
push eax
push esi
push 0x57c348
call sub.MSVCRT.dll_memset
add esp, 0xc
push dword [0x9bd274]
call edi
push eax
push esi
push 0x9bd2b8
call sub.MSVCRT.dll_memset
add esp, 0xc
push dword [0x9bd24c]
call edi
push eax
push esi
push 0xa32600
call sub.MSVCRT.dll_memset
add esp, 0xc
push dword [0x40db48]
call edi
push eax
push esi
push 0x8ba514
call sub.MSVCRT.dll_memset
add esp, 0xc
call fcn.0040105a
push esi
push 0x80000020
push 3
push esi
push ebx
push 0x80000000
push 0xac5730
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, dword [esp + 0x44]
mov ecx, dword [0x6a1300]
mov ebp, eax
mov dword [esp + 0x44], ecx
lea eax, [ebx + 0xc]
cmp ecx, eax
jl 0x406f27
mov dword [esp + 0x44], eax
cmp ebx, dword [esp + 0x44]
mov edi, ebx
jge 0x406fa9
lea eax, [ebx + ebx*2]
shl eax, 3
mov dword [esp + 0x14], eax
mov eax, dword [0x9bd2ac]
mov ecx, dword [esp + 0x14]
lea eax, [ecx + eax + 8]
push eax
push str.THINGS
call sub.MSVCRT.dll_strcmp
pop ecx
test eax, eax
pop ecx
je 0x406f65
add dword [esp + 0x14], 0x18
inc edi
cmp edi, dword [esp + 0x44]
jl 0x406f39
jmp 0x406fa9
mov ecx, dword [0x9bd2ac]
lea eax, [edi + edi*2]
push 0xa
xor edx, edx
mov eax, dword [ecx + eax*8 + 4]
pop ecx
div ecx
mov dword [esp + 0x10], eax
add eax, 0x32
push eax
call fcn.004010eb
mov eax, dword [esp + 0x14]
pop ecx
cmp eax, esi
mov dword [0xa325e4], eax
jle 0x406fa9
mov ecx, dword [esp + 0x10]
mov eax, 0x71b440
mov dword [eax], 1
add eax, 8
dec ecx
jne 0x406f9d
mov eax, dword [0x9bd2ac]
lea edi, [edi + edi*2]
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
shl edi, 3
push 0
push dword [edi + eax]
push ebp
call esi
mov eax, dword [0x9bd2ac]
push 0
push 0x9bd260
push dword [edi + eax + 4]
push 0x6a1308
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp ebx, dword [esp + 0x44]
mov edi, ebx
jge 0x40705e
lea eax, [ebx + ebx*2]
shl eax, 3
mov dword [esp + 0x14], eax
jmp 0x406ff8
mov eax, dword [esp + 0x14]
mov ecx, dword [0x9bd2ac]
lea eax, [eax + ecx + 8]
push eax
push str.VERTEXES
call sub.MSVCRT.dll_strcmp
pop ecx
test eax, eax
pop ecx
je 0x407021
add dword [esp + 0x14], 0x18
inc edi
cmp edi, dword [esp + 0x44]
jl 0x406ff4
jmp 0x40705e
mov ecx, dword [0x9bd2ac]
lea eax, [edi + edi*2]
mov eax, dword [ecx + eax*8 + 4]
shr eax, 3
mov dword [esp + 0x10], eax
add eax, 0x64
push eax
call fcn.0040100a
pop ecx
mov ecx, dword [esp + 0x10]
test ecx, ecx
mov dword [0x996148], ecx
jle 0x40705e
mov eax, 0x9bd2b8
mov dword [eax], 1
add eax, 0xc
dec ecx
jne 0x407052
mov eax, dword [0x9bd2ac]
lea edi, [edi + edi*2]
shl edi, 3
push 0
push 0
push dword [edi + eax]
push ebp
call esi
mov eax, dword [0x9bd2ac]
push 0
push 0x9bd260
push dword [edi + eax + 4]
push 0x99614c
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp ebx, dword [esp + 0x44]
mov edi, ebx
jge 0x407111
lea eax, [ebx + ebx*2]
shl eax, 3
mov dword [esp + 0x14], eax
mov eax, dword [0x9bd2ac]
mov ecx, dword [esp + 0x14]
lea eax, [ecx + eax + 8]
push eax
push str.LINEDEFS
call sub.MSVCRT.dll_strcmp
pop ecx
test eax, eax
pop ecx
je 0x4070cd
add dword [esp + 0x14], 0x18
inc edi
cmp edi, dword [esp + 0x44]
jl 0x4070a1
jmp 0x407111
mov ecx, dword [0x9bd2ac]
lea eax, [edi + edi*2]
push 0xe
xor edx, edx
mov eax, dword [ecx + eax*8 + 4]
pop ecx
div ecx
mov dword [esp + 0x10], eax
add eax, 0x14
push eax
call fcn.00401087
mov eax, dword [esp + 0x14]
pop ecx
test eax, eax
mov dword [0xac4dc0], eax
jle 0x407111
mov ecx, dword [esp + 0x10]
mov eax, 0xa32600
mov dword [eax], 1
add eax, 0xc
dec ecx
jne 0x407105
mov eax, dword [0x9bd2ac]
lea edi, [edi + edi*2]
shl edi, 3
push 0
push 0
push dword [edi + eax]
push ebp
call esi
mov eax, dword [0x9bd2ac]
push 0
push 0x9bd260
push dword [edi + eax + 4]
push 0x8eb2b8
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp ebx, dword [esp + 0x44]
mov edi, ebx
mov dword [esp + 0x18], edi
jge 0x4071c9
lea eax, [ebx + ebx*2]
shl eax, 3
mov dword [esp + 0x14], eax
jmp 0x40715e
mov eax, dword [esp + 0x14]
mov ecx, dword [0x9bd2ac]
lea eax, [eax + ecx + 8]
push eax
push str.SIDEDEFS
call sub.MSVCRT.dll_strcmp
pop ecx
test eax, eax
pop ecx
je 0x40718b
add dword [esp + 0x14], 0x18
inc edi
cmp edi, dword [esp + 0x44]
mov dword [esp + 0x18], edi
jl 0x40715a
jmp 0x4071c9
mov ecx, dword [0x9bd2ac]
lea eax, [edi + edi*2]
push 0x1e
xor edx, edx
mov eax, dword [ecx + eax*8 + 4]
pop ecx
div ecx
mov dword [esp + 0x10], eax
add eax, 0x14
push eax
call fcn.004010cd
pop ecx
mov ecx, dword [esp + 0x10]
test ecx, ecx
mov dword [0xac4dc8], ecx
jle 0x4071c9
push 1
mov edi, 0x8ba514
pop eax
rep stosd dword es:[edi], eax
mov edi, dword [esp + 0x18]
mov eax, dword [0x9bd2ac]
lea edi, [edi + edi*2]
shl edi, 3
push 0
push 0
push dword [edi + eax]
push ebp
call esi
mov eax, dword [0x9bd2ac]
push 0
push 0x9bd260
push dword [edi + eax + 4]
push 0x40dfc0
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp ebx, dword [esp + 0x44]
mov edi, ebx
jge 0x407266
lea eax, [ebx + ebx*2]
shl eax, 3
mov dword [esp + 0x14], eax
jmp 0x407212
mov eax, dword [esp + 0x14]
mov ecx, dword [0x9bd2ac]
lea eax, [eax + ecx + 8]
push eax
push str.SEGS
call sub.MSVCRT.dll_strcmp
pop ecx
test eax, eax
pop ecx
je 0x40723b
add dword [esp + 0x14], 0x18
inc edi
cmp edi, dword [esp + 0x44]
jl 0x40720e
jmp 0x407266
mov ecx, dword [0x9bd2ac]
lea eax, [edi + edi*2]
push 0xc
xor edx, edx
mov eax, dword [ecx + eax*8 + 4]
pop ecx
div ecx
mov dword [esp + 0x10], eax
add eax, 0x14
push eax
call fcn.0040104b
mov eax, dword [esp + 0x14]
pop ecx
mov dword [0xac5720], eax
mov eax, dword [0x9bd2ac]
lea edi, [edi + edi*2]
shl edi, 3
push 0
push 0
push dword [edi + eax]
push ebp
call esi
mov eax, dword [0x9bd2ac]
push 0
push 0x9bd260
push dword [edi + eax + 4]
push dword [0xac52cc]
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp ebx, dword [esp + 0x44]
mov edi, ebx
jge 0x407300
lea eax, [ebx + ebx*2]
shl eax, 3
mov dword [esp + 0x14], eax
jmp 0x4072b0
mov eax, dword [esp + 0x14]
mov ecx, dword [0x9bd2ac]
lea eax, [ecx + eax + 8]
push eax
push str.SSECTORS
call sub.MSVCRT.dll_strcmp
pop ecx
test eax, eax
pop ecx
je 0x4072d9
add dword [esp + 0x14], 0x18
inc edi
cmp edi, dword [esp + 0x44]
jl 0x4072ac
jmp 0x407300
mov ecx, dword [0x9bd2ac]
lea eax, [edi + edi*2]
mov eax, dword [ecx + eax*8 + 4]
shr eax, 2
mov dword [esp + 0x10], eax
add eax, 0x14
push eax
call fcn.0040114a
mov eax, dword [esp + 0x14]
pop ecx
mov dword [0x40dfbc], eax
mov eax, dword [0x9bd2ac]
lea edi, [edi + edi*2]
shl edi, 3
push 0
push 0
push dword [edi + eax]
push ebp
call esi
mov eax, dword [0x9bd2ac]
push 0
push 0x9bd260
push dword [edi + eax + 4]
push dword [0x8eb2ac]
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp ebx, dword [esp + 0x44]
mov edi, ebx
jge 0x40739e
lea eax, [ebx + ebx*2]
shl eax, 3
mov dword [esp + 0x14], eax
jmp 0x40734a
mov eax, dword [esp + 0x14]
mov ecx, dword [0x9bd2ac]
lea eax, [ecx + eax + 8]
push eax
push str.NODES
call sub.MSVCRT.dll_strcmp
pop ecx
test eax, eax
pop ecx
je 0x407373
add dword [esp + 0x14], 0x18
inc edi
cmp edi, dword [esp + 0x44]
jl 0x407346
jmp 0x40739e
mov ecx, dword [0x9bd2ac]
lea eax, [edi + edi*2]
push 0x1c
xor edx, edx
mov eax, dword [ecx + eax*8 + 4]
pop ecx
div ecx
mov dword [esp + 0x10], eax
add eax, 0x14
push eax
call fcn.004010af
mov eax, dword [esp + 0x14]
pop ecx
mov dword [0xac52d0], eax
mov eax, dword [0x9bd2ac]
lea edi, [edi + edi*2]
shl edi, 3
push 0
push 0
push dword [edi + eax]
push ebp
call esi
mov eax, dword [0x9bd2ac]
push 0
push 0x9bd260
push dword [edi + eax + 4]
push dword [0x77ced8]
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp ebx, dword [esp + 0x44]
mov esi, ebx
jge 0x40743f
lea edi, [ebx + ebx*2]
shl edi, 3
mov eax, dword [0x9bd2ac]
lea eax, [eax + edi + 8]
push eax
push str.SECTORS
call sub.MSVCRT.dll_strcmp
pop ecx
test eax, eax
pop ecx
je 0x407404
inc esi
add edi, 0x18
cmp esi, dword [esp + 0x44]
jl 0x4073de
jmp 0x40743f
mov ecx, dword [0x9bd2ac]
lea eax, [esi + esi*2]
push 0x1a
xor edx, edx
mov eax, dword [ecx + eax*8 + 4]
pop ecx
div ecx
mov edi, eax
lea eax, [edi + 0x14]
push eax
call fcn.00401023
test edi, edi
pop ecx
mov dword [0x40db70], edi
jle 0x40743f
mov eax, 0x57c348
mov dword [eax], 1
add eax, 0x18
dec edi
jne 0x407433
mov eax, dword [0x9bd2ac]
lea esi, [esi + esi*2]
xor edi, edi
shl esi, 3
push edi
push edi
push dword [esi + eax]
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [0x9bd2ac]
push edi
push 0x9bd260
push dword [esi + eax + 4]
push 0x77cee0
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [0xac52c8]
push 0x40d89c
mov dword [eax], edi
mov eax, dword [0xac52c8]
add eax, 4
push eax
call sub.MSVCRT.dll_strcpy
mov eax, dword [0xac52c8]
push str.No_Tag_Number
add eax, 0x14
push eax
call sub.MSVCRT.dll_strcpy
add esp, 0x10
cmp ebx, dword [esp + 0x44]
mov esi, ebx
push 1
pop eax
mov dword [0xac571c], eax
jge 0x407506
lea edi, [ebx + ebx*2]
shl edi, 3
mov eax, dword [0x9bd2ac]
lea eax, [edi + eax + 8]
push eax
push str.PLATFORM
call sub.MSVCRT.dll_strcmp
pop ecx
test eax, eax
pop ecx
je 0x407635
mov eax, dword [0x9bd2ac]
lea eax, [edi + eax + 8]
push eax
push str.TAGDESC
call sub.MSVCRT.dll_strcmp
pop ecx
test eax, eax
pop ecx
je 0x407635
inc esi
add edi, 0x18
cmp esi, dword [esp + 0x44]
jl 0x4074b9
mov eax, dword [0xac571c]
xor edi, edi
cmp dword [0x40db70], edi
mov dword [esp + 0x18], edi
jle 0x4075f0
mov esi, 0x77cef8
mov cx, word [esi]
cmp cx, di
jle 0x4075d9
cmp eax, 1
mov dword [esp + 0x10], edi
jle 0x407566
movsx edx, cx
mov ecx, dword [0xac52c8]
lea edi, [eax - 1]
add ecx, 0x114
mov dword [esp + 0x14], edi
cmp dword [ecx], edx
jne 0x407552
mov dword [esp + 0x10], 1
add ecx, 0x114
dec dword [esp + 0x14]
jne 0x407546
xor edi, edi
cmp dword [esp + 0x10], edi
jne 0x4075d9
movsx ecx, word [esi]
cmp dword [0xac5700], ecx
jg 0x407577
mov dword [0xac5700], ecx
imul eax, eax, 0x114
mov edx, dword [0xac52c8]
mov dword [eax + edx], ecx
mov ecx, dword [0xac52c8]
movsx eax, word [esi]
push eax
mov eax, dword [0xac571c]
imul eax, eax, 0x114
push str.Tag_i
lea eax, [eax + ecx + 4]
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
mov eax, dword [0xac571c]
mov ecx, dword [0xac52c8]
imul eax, eax, 0x114
inc dword [0xac571c]
push 0xc1da2c
lea eax, [eax + ecx + 0x14]
push eax
call sub.MSVCRT.dll_strcpy
mov eax, dword [0xac571c]
add esp, 0x14
inc dword [esp + 0x18]
add esi, 0x1a
mov ecx, dword [esp + 0x18]
cmp ecx, dword [0x40db70]
jl 0x40751b
inc dword [0xac5700]
cmp ebx, dword [esp + 0x44]
mov esi, ebx
jge 0x40773a
lea edi, [ebx + ebx*2]
shl edi, 3
mov eax, dword [0x9bd2ac]
lea eax, [edi + eax + 8]
push eax
push str.REJECT
call sub.MSVCRT.dll_strcmp
pop ecx
test eax, eax
pop ecx
je 0x407728
inc esi
add edi, 0x18
cmp esi, dword [esp + 0x44]
jl 0x407608
jmp 0x40773a
mov eax, dword [0x9bd2ac]
lea esi, [esi + esi*2]
shl esi, 3
xor edx, edx
mov edi, 0x114
lea ecx, [esi + eax]
mov eax, dword [esi + eax + 4]
div edi
xor edi, edi
push edi
push edi
inc eax
mov dword [0xac571c], eax
push dword [ecx]
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [0x9bd2ac]
push edi
push 0x9bd260
push dword [esi + eax + 4]
push dword [0xac52c8]
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [0xac571c]
cmp eax, edi
jle 0x4076fc
push 1
pop ecx
cmp eax, ecx
mov dword [esp + 0x14], ecx
jle 0x4076fc
mov dword [esp + 0x10], 0x114
mov ecx, dword [esp + 0x10]
mov edx, dword [0xac52c8]
cmp dword [edx + ecx], 0
jne 0x4076ea
mov ecx, dword [esp + 0x14]
lea edx, [eax - 1]
cmp ecx, edx
mov dword [esp + 0x18], ecx
jge 0x4076ea
mov edx, dword [esp + 0x10]
mov eax, dword [0xac52c8]
push 0x45
inc dword [esp + 0x1c]
pop ecx
lea esi, [eax + edx + 0x114]
lea edi, [eax + edx]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [0xac571c]
add edx, 0x114
lea ecx, [eax - 1]
cmp dword [esp + 0x18], ecx
jl 0x4076be
inc dword [esp + 0x14]
add dword [esp + 0x10], 0x114
cmp dword [esp + 0x14], eax
jl 0x40769b
test eax, eax
jle 0x4075f0
mov ecx, dword [0xac52c8]
mov edx, dword [ecx]
cmp dword [0xac5700], edx
jg 0x40771a
mov dword [0xac5700], edx
add ecx, 0x114
dec eax
jne 0x40770a
jmp 0x4075f0
mov ecx, dword [0x9bd2ac]
lea eax, [esi + esi*2]
mov eax, dword [ecx + eax*8 + 4]
mov dword [0xac5930], eax
mov eax, dword [0x9bd2ac]
lea esi, [esi + esi*2]
xor edi, edi
shl esi, 3
push edi
push edi
push dword [esi + eax]
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [0x9bd2ac]
push edi
push 0x9bd260
push dword [esi + eax + 4]
push dword [0x8eb2b0]
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp ebx, dword [esp + 0x44]
mov esi, ebx
jge 0x4077b5
lea ebx, [ebx + ebx*2]
shl ebx, 3
mov eax, dword [0x9bd2ac]
lea eax, [ebx + eax + 8]
push eax
push str.BLOCKMAP
call sub.MSVCRT.dll_strcmp
pop ecx
test eax, eax
pop ecx
je 0x4077a3
inc esi
add ebx, 0x18
cmp esi, dword [esp + 0x44]
jl 0x40777d
jmp 0x4077b5
mov ecx, dword [0x9bd2ac]
lea eax, [esi + esi*2]
mov eax, dword [ecx + eax*8 + 4]
mov dword [0x6a12c8], eax
mov eax, dword [0x9bd2ac]
lea esi, [esi + esi*2]
xor ebx, ebx
shl esi, 3
push ebx
push ebx
push dword [esi + eax]
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [0x9bd2ac]
push ebx
push 0x9bd260
push dword [esi + eax + 4]
push dword [0xac5958]
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.0040100f
lea eax, [esp + 0x2c]
push eax
call fcn.00401168
mov esi, eax
lea edi, [esp + 0x20]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov ebp, 0x996138
lea esi, [esp + 0x20]
mov edi, ebp
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.0040108c
call fcn.00401145
lea eax, [esp + 0x30]
push eax
call fcn.00401168
mov esi, eax
lea edi, [esp + 0x24]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea esi, [esp + 0x24]
mov edi, ebp
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
pop ecx
pop ecx
movsd dword es:[edi], dword [esi]
call fcn.00401028
push 0xffffffffffffffff
push dword [0x40db98]
call dword [sym.imp.GDI32.dll_RestoreDC]
fild dword [0x71b434]
push ebx
fmul dword [0xac4de0]
call sub.MSVCRT.dll__ftol
add eax, dword [0xa325c4]
push eax
push dword [0xa325c0]
push dword [0x40db98]
call dword [sym.imp.GDI32.dll_SetWindowOrgEx]
push dword [0x40db98]
call dword [sym.imp.GDI32.dll_SaveDC]
pop edi
pop esi
pop ebp
mov dword [0xac59f8], 1
pop ebx
add esp, 0x2c
ret