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 [0x57c34c]
mov dword [0xac5718], ebx
call edi
xor esi, esi
push eax
push esi
push 0x71b458
call sub.MSVCRT.dll_memset
add esp, 0xc
push dword [0xa325ec]
call edi
push eax
push esi
push 0x57c360
call sub.MSVCRT.dll_memset
add esp, 0xc
push dword [0x9bd28c]
call edi
push eax
push esi
push 0x9bd2d0
call sub.MSVCRT.dll_memset
add esp, 0xc
push dword [0x9bd264]
call edi
push eax
push esi
push 0xa32618
call sub.MSVCRT.dll_memset
add esp, 0xc
push dword [0x40db60]
call edi
push eax
push esi
push 0x8ba52c
call sub.MSVCRT.dll_memset
add esp, 0xc
call fcn.0040105a
push esi
push 0x80000020
push 3
push esi
push ebx
push 0x80000000
push 0xac5748
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, dword [esp + 0x44]
mov ecx, dword [0x6a1318]
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 [0x9bd2c4]
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 [0x9bd2c4]
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 [0xa325fc], eax
jle 0x406fa9
mov ecx, dword [esp + 0x10]
mov eax, 0x71b458
mov dword [eax], 1
add eax, 8
dec ecx
jne 0x406f9d
mov eax, dword [0x9bd2c4]
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 [0x9bd2c4]
push 0
push 0x9bd278
push dword [edi + eax + 4]
push 0x6a1320
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 [0x9bd2c4]
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 [0x9bd2c4]
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 [0x996160], ecx
jle 0x40705e
mov eax, 0x9bd2d0
mov dword [eax], 1
add eax, 0xc
dec ecx
jne 0x407052
mov eax, dword [0x9bd2c4]
lea edi, [edi + edi*2]
shl edi, 3
push 0
push 0
push dword [edi + eax]
push ebp
call esi
mov eax, dword [0x9bd2c4]
push 0
push 0x9bd278
push dword [edi + eax + 4]
push 0x996164
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 [0x9bd2c4]
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 [0x9bd2c4]
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 [0xac4dd8], eax
jle 0x407111
mov ecx, dword [esp + 0x10]
mov eax, 0xa32618
mov dword [eax], 1
add eax, 0xc
dec ecx
jne 0x407105
mov eax, dword [0x9bd2c4]
lea edi, [edi + edi*2]
shl edi, 3
push 0
push 0
push dword [edi + eax]
push ebp
call esi
mov eax, dword [0x9bd2c4]
push 0
push 0x9bd278
push dword [edi + eax + 4]
push 0x8eb2d0
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 [0x9bd2c4]
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 [0x9bd2c4]
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 [0xac4de0], ecx
jle 0x4071c9
push 1
mov edi, 0x8ba52c
pop eax
rep stosd dword es:[edi], eax
mov edi, dword [esp + 0x18]
mov eax, dword [0x9bd2c4]
lea edi, [edi + edi*2]
shl edi, 3
push 0
push 0
push dword [edi + eax]
push ebp
call esi
mov eax, dword [0x9bd2c4]
push 0
push 0x9bd278
push dword [edi + eax + 4]
push 0x40dfd8
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 [0x9bd2c4]
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 [0x9bd2c4]
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 [0xac5738], eax
mov eax, dword [0x9bd2c4]
lea edi, [edi + edi*2]
shl edi, 3
push 0
push 0
push dword [edi + eax]
push ebp
call esi
mov eax, dword [0x9bd2c4]
push 0
push 0x9bd278
push dword [edi + eax + 4]
push dword [0xac52e4]
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 [0x9bd2c4]
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 [0x9bd2c4]
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 [0x40dfd4], eax
mov eax, dword [0x9bd2c4]
lea edi, [edi + edi*2]
shl edi, 3
push 0
push 0
push dword [edi + eax]
push ebp
call esi
mov eax, dword [0x9bd2c4]
push 0
push 0x9bd278
push dword [edi + eax + 4]
push dword [0x8eb2c4]
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 [0x9bd2c4]
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 [0x9bd2c4]
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 [0xac52e8], eax
mov eax, dword [0x9bd2c4]
lea edi, [edi + edi*2]
shl edi, 3
push 0
push 0
push dword [edi + eax]
push ebp
call esi
mov eax, dword [0x9bd2c4]
push 0
push 0x9bd278
push dword [edi + eax + 4]
push dword [0x77cef0]
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 [0x9bd2c4]
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 [0x9bd2c4]
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 [0x40db88], edi
jle 0x40743f
mov eax, 0x57c360
mov dword [eax], 1
add eax, 0x18
dec edi
jne 0x407433
mov eax, dword [0x9bd2c4]
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 [0x9bd2c4]
push edi
push 0x9bd278
push dword [esi + eax + 4]
push 0x77cef8
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [0xac52e0]
push 0x40d8a0
mov dword [eax], edi
mov eax, dword [0xac52e0]
add eax, 4
push eax
call sub.MSVCRT.dll_strcpy
mov eax, dword [0xac52e0]
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 [0xac5734], eax
jge 0x407506
lea edi, [ebx + ebx*2]
shl edi, 3
mov eax, dword [0x9bd2c4]
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 [0x9bd2c4]
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 [0xac5734]
xor edi, edi
cmp dword [0x40db88], edi
mov dword [esp + 0x18], edi
jle 0x4075f0
mov esi, 0x77cf10
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 [0xac52e0]
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 [0xac5718], ecx
jg 0x407577
mov dword [0xac5718], ecx
imul eax, eax, 0x114
mov edx, dword [0xac52e0]
mov dword [eax + edx], ecx
mov ecx, dword [0xac52e0]
movsx eax, word [esi]
push eax
mov eax, dword [0xac5734]
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 [0xac5734]
mov ecx, dword [0xac52e0]
imul eax, eax, 0x114
inc dword [0xac5734]
push 0xc1da44
lea eax, [eax + ecx + 0x14]
push eax
call sub.MSVCRT.dll_strcpy
mov eax, dword [0xac5734]
add esp, 0x14
inc dword [esp + 0x18]
add esi, 0x1a
mov ecx, dword [esp + 0x18]
cmp ecx, dword [0x40db88]
jl 0x40751b
inc dword [0xac5718]
cmp ebx, dword [esp + 0x44]
mov esi, ebx
jge 0x40773a
lea edi, [ebx + ebx*2]
shl edi, 3
mov eax, dword [0x9bd2c4]
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 [0x9bd2c4]
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 [0xac5734], eax
push dword [ecx]
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [0x9bd2c4]
push edi
push 0x9bd278
push dword [esi + eax + 4]
push dword [0xac52e0]
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [0xac5734]
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 [0xac52e0]
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 [0xac52e0]
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 [0xac5734]
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 [0xac52e0]
mov edx, dword [ecx]
cmp dword [0xac5718], edx
jg 0x40771a
mov dword [0xac5718], edx
add ecx, 0x114
dec eax
jne 0x40770a
jmp 0x4075f0
mov ecx, dword [0x9bd2c4]
lea eax, [esi + esi*2]
mov eax, dword [ecx + eax*8 + 4]
mov dword [0xac5948], eax
mov eax, dword [0x9bd2c4]
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 [0x9bd2c4]
push edi
push 0x9bd278
push dword [esi + eax + 4]
push dword [0x8eb2c8]
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 [0x9bd2c4]
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 [0x9bd2c4]
lea eax, [esi + esi*2]
mov eax, dword [ecx + eax*8 + 4]
mov dword [0x6a12e0], eax
mov eax, dword [0x9bd2c4]
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 [0x9bd2c4]
push ebx
push 0x9bd278
push dword [esi + eax + 4]
push dword [0xac5970]
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, 0x996150
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 [0x40dbb0]
call dword [sym.imp.GDI32.dll_RestoreDC]
fild dword [0x71b44c]
push ebx
fmul dword [0xac4df8]
call sub.MSVCRT.dll__ftol
add eax, dword [0xa325dc]
push eax
push dword [0xa325d8]
push dword [0x40dbb0]
call dword [sym.imp.GDI32.dll_SetWindowOrgEx]
push dword [0x40dbb0]
call dword [sym.imp.GDI32.dll_SaveDC]
pop edi
pop esi
pop ebp
mov dword [0xac5a10], 1
pop ebx
add esp, 0x2c
ret