Function at 0x10002350
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa0
mov eax, dword [0x10030190]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor ebx, ebx
push ebx
push 0x80000020
push 3
push ebx
push 1
push 0x80000000
push 0x1050f030
mov dword [ebp - 0x90], ebx
mov dword [ebp - 0x94], ebx
mov dword [ebp - 0x8c], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
push 0x10156d38
mov esi, eax
push 4
lea eax, [ebp - 0x84]
push eax
push esi
mov dword [ebp - 0x88], esi
call edi
mov byte [ebp - 0x80], bl
mov ecx, str.IWAD
lea eax, [ebp - 0x84]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x100023e3
test dl, dl
je 0x100023df
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x100023e3
add eax, 2
add ecx, 2
test dl, dl
jne 0x100023c3
xor eax, eax
jmp 0x100023e8
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x1000242b
mov ecx, str.PWAD
lea eax, [ebp - 0x84]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x10002417
test dl, dl
je 0x10002413
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x10002417
add eax, 2
add ecx, 2
test dl, dl
jne 0x100023f7
xor eax, eax
jmp 0x1000241c
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x1000242b
mov dword [0x106e9560], ebx
jmp 0x10002dae
push ebx
push 0x10156d38
push 4
lea ecx, [ebp - 0x9c]
push ecx
push esi
call edi
mov eax, dword [0x106e953c]
mov edx, dword [ebp - 0x9c]
push eax
mov dword [0x10156d64], edx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov ecx, dword [0x106e953c]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [0x10156d64]
lea edx, [eax + eax*2]
add edx, edx
add edx, edx
add edx, edx
push edx
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
mov dword [0x106e953c], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
push ebx
push 0x10156d38
mov dword [0x105ab568], eax
push 4
lea eax, [ebp - 0xa0]
push eax
push esi
call edi
mov ecx, dword [ebp - 0xa0]
push ebx
push ebx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x98], ebx
cmp dword [0x10156d64], ebx
jle 0x10002c2c
xor ebx, ebx
mov edx, dword [0x105ab568]
mov ecx, dword [ebp - 0x88]
push 0
push 0x10156d38
push 0x10
lea eax, [ebx + edx]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [0x105ab568]
mov byte [ebx + edx + 0x10], 0
mov eax, dword [0x105ab568]
cmp dword [ebx + eax + 4], 0
jle 0x10002539
cmp dword [ebp - 0x90], 0
je 0x1000250d
mov dword [ebx + eax + 0x14], 0xc
jmp 0x10002c10
cmp dword [ebp - 0x94], 0
je 0x10002523
mov dword [ebx + eax + 0x14], 0xd
jmp 0x10002c10
cmp dword [ebp - 0x8c], 0
je 0x10002539
mov dword [ebx + eax + 0x14], 0xe
jmp 0x10002c10
push 2
lea eax, [ebx + eax + 8]
push 0x1002bf40
push eax
call fcn.1000ce7a
add esp, 0xc
test eax, eax
jne 0x10002564
mov ecx, dword [0x105ab568]
mov dword [ebx + ecx + 0x14], 0x10
jmp 0x10002c10
mov edx, dword [0x105ab568]
push 2
lea eax, [ebx + edx + 8]
push 0x1002bf3c
push eax
call fcn.1000ce7a
add esp, 0xc
test eax, eax
jne 0x10002595
mov ecx, dword [0x105ab568]
mov dword [ebx + ecx + 0x14], 0x11
jmp 0x10002c10
mov edx, dword [0x105ab568]
push 2
lea eax, [ebx + edx + 8]
push 0x1002bf38
push eax
call fcn.1000ce7a
add esp, 0xc
test eax, eax
jne 0x100025c6
mov ecx, dword [0x105ab568]
mov dword [ebx + ecx + 0x14], 0xf
jmp 0x10002c10
mov edx, dword [0x105ab568]
push 2
lea eax, [ebx + edx + 8]
push 0x1002bf34
push eax
call fcn.1000ce7a
add esp, 0xc
test eax, eax
jne 0x100025f7
mov ecx, dword [0x105ab568]
mov dword [ebx + ecx + 0x14], 0x1a
jmp 0x10002c10
mov edx, dword [0x105ab568]
push 2
lea eax, [ebx + edx + 8]
push 0x1002bf30
push eax
call fcn.1000ce7a
add esp, 0xc
test eax, eax
jne 0x10002628
mov ecx, dword [0x105ab568]
mov dword [ebx + ecx + 0x14], 0x1b
jmp 0x10002c10
mov edx, dword [0x105ab568]
push 2
lea eax, [ebx + edx + 8]
push 0x1002bf2c
push eax
call fcn.1000ce7a
add esp, 0xc
test eax, eax
jne 0x10002659
mov ecx, dword [0x105ab568]
mov dword [ebx + ecx + 0x14], 0x19
jmp 0x10002c10
mov edx, dword [0x105ab568]
push 4
lea eax, [ebx + edx + 8]
push str.DEMO
push eax
call fcn.1000ce7a
add esp, 0xc
test eax, eax
jne 0x1000268a
mov ecx, dword [0x105ab568]
mov dword [ebx + ecx + 0x14], 0x16
jmp 0x10002c10
mov edx, dword [0x105ab568]
push 4
lea eax, [ebx + edx + 8]
push str.PNAM
push eax
call fcn.1000ce7a
add esp, 0xc
test eax, eax
jne 0x100026bb
mov ecx, dword [0x105ab568]
mov dword [ebx + ecx + 0x14], 0x17
jmp 0x10002c10
mov edi, dword [0x105ab568]
lea esi, [ebx + edi + 8]
mov ecx, str.PLAYPAL
mov eax, esi
lea esp, [esp]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x100026f0
test dl, dl
je 0x100026ec
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x100026f0
add eax, 2
add ecx, 2
test dl, dl
jne 0x100026d0
xor eax, eax
jmp 0x100026f5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x10002706
mov dword [ebx + edi + 0x14], 0x13
jmp 0x10002c10
mov ecx, str.COLORMAP
mov eax, esi
lea ecx, [ecx]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x10002730
test dl, dl
je 0x1000272c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x10002730
add eax, 2
add ecx, 2
test dl, dl
jne 0x10002710
xor eax, eax
jmp 0x10002735
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x10002746
mov dword [ebx + edi + 0x14], 0x14
jmp 0x10002c10
push 6
push str.TEXTUR
push esi
call fcn.1000ce7a
add esp, 0xc
test eax, eax
jne 0x1000276d
mov edx, dword [0x105ab568]
mov dword [ebx + edx + 0x14], 0x12
jmp 0x10002c10
mov edi, dword [0x105ab568]
lea esi, [ebx + edi + 8]
mov ecx, str.THINGS
mov eax, esi
mov edi, edi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x100027a0
test dl, dl
je 0x1000279c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x100027a0
add eax, 2
add ecx, 2
test dl, dl
jne 0x10002780
xor eax, eax
jmp 0x100027a5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x100027b6
mov dword [ebx + edi + 0x14], 2
jmp 0x10002c10
mov ecx, str.LINEDEFS
mov eax, esi
lea ecx, [ecx]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x100027e0
test dl, dl
je 0x100027dc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x100027e0
add eax, 2
add ecx, 2
test dl, dl
jne 0x100027c0
xor eax, eax
jmp 0x100027e5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x100027f6
mov dword [ebx + edi + 0x14], 3
jmp 0x10002c10
mov ecx, str.SIDEDEFS
mov eax, esi
lea ecx, [ecx]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x10002820
test dl, dl
je 0x1000281c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x10002820
add eax, 2
add ecx, 2
test dl, dl
jne 0x10002800
xor eax, eax
jmp 0x10002825
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x10002836
mov dword [ebx + edi + 0x14], 4
jmp 0x10002c10
mov ecx, str.VERTEXES
mov eax, esi
lea ecx, [ecx]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x10002860
test dl, dl
je 0x1000285c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x10002860
add eax, 2
add ecx, 2
test dl, dl
jne 0x10002840
xor eax, eax
jmp 0x10002865
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x10002876
mov dword [ebx + edi + 0x14], 5
jmp 0x10002c10
mov ecx, str.SEGS
mov eax, esi
lea ecx, [ecx]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x100028a0
test dl, dl
je 0x1000289c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x100028a0
add eax, 2
add ecx, 2
test dl, dl
jne 0x10002880
xor eax, eax
jmp 0x100028a5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x100028b6
mov dword [ebx + edi + 0x14], 6
jmp 0x10002c10
mov ecx, str.SSECTORS
mov eax, esi
lea ecx, [ecx]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x100028e0
test dl, dl
je 0x100028dc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x100028e0
add eax, 2
add ecx, 2
test dl, dl
jne 0x100028c0
xor eax, eax
jmp 0x100028e5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x100028f6
mov dword [ebx + edi + 0x14], 7
jmp 0x10002c10
mov ecx, str.NODES
mov eax, esi
lea ecx, [ecx]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x10002920
test dl, dl
je 0x1000291c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x10002920
add eax, 2
add ecx, 2
test dl, dl
jne 0x10002900
xor eax, eax
jmp 0x10002925
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x10002936
mov dword [ebx + edi + 0x14], 8
jmp 0x10002c10
mov ecx, str.SECTORS
mov eax, esi
lea ecx, [ecx]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x10002960
test dl, dl
je 0x1000295c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x10002960
add eax, 2
add ecx, 2
test dl, dl
jne 0x10002940
xor eax, eax
jmp 0x10002965
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x10002976
mov dword [ebx + edi + 0x14], 9
jmp 0x10002c10
mov ecx, str.REJECT
mov eax, esi
lea ecx, [ecx]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x100029a0
test dl, dl
je 0x1000299c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x100029a0
add eax, 2
add ecx, 2
test dl, dl
jne 0x10002980
xor eax, eax
jmp 0x100029a5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x100029b6
mov dword [ebx + edi + 0x14], 0xa
jmp 0x10002c10
mov ecx, str.BLOCKMAP
mov eax, esi
lea ecx, [ecx]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x100029e0
test dl, dl
je 0x100029dc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x100029e0
add eax, 2
add ecx, 2
test dl, dl
jne 0x100029c0
xor eax, eax
jmp 0x100029e5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x100029f6
mov dword [ebx + edi + 0x14], 0xb
jmp 0x10002c10
push 8
push str.PLATFORM
push esi
call fcn.1000ce7a
add esp, 0xc
test eax, eax
je 0x10002c02
mov eax, dword [0x105ab568]
push 7
lea ecx, [ebx + eax + 8]
push str.TAGDESC
push ecx
call fcn.1000ce7a
add esp, 0xc
test eax, eax
je 0x10002c02
mov edi, dword [0x105ab568]
lea esi, [ebx + edi + 8]
mov ecx, str.ENDOOM
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x10002a60
test dl, dl
je 0x10002a5c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x10002a60
add eax, 2
add ecx, 2
test dl, dl
jne 0x10002a40
xor eax, eax
jmp 0x10002a65
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x10002a76
mov dword [ebx + edi + 0x14], 0x15
jmp 0x10002c10
push 3
push 0x1002be70
push esi
call fcn.1000ce7a
add esp, 0xc
test eax, eax
jne 0x10002a9d
mov edx, dword [0x105ab568]
mov dword [ebx + edx + 0x14], 0x18
jmp 0x10002c10
mov eax, dword [0x105ab568]
push 7
lea ecx, [ebx + eax + 8]
push str.GENMIDI
push ecx
call fcn.1000ce7a
add esp, 0xc
test eax, eax
jne 0x10002acd
mov edx, dword [0x105ab568]
mov dword [ebx + edx + 0x14], 0x18
jmp 0x10002c10
mov eax, dword [0x105ab568]
mov dword [ebx + eax + 0x14], 0x1c
mov ecx, dword [0x105ab568]
xor esi, esi
cmp dword [ebx + ecx + 4], esi
jne 0x10002c10
mov al, byte [ebx + ecx + 8]
cmp al, 0x45
jne 0x10002b02
cmp byte [ebx + ecx + 0xa], 0x4d
jne 0x10002b02
cmp byte [ebx + ecx + 0xc], 0
je 0x10002b14
cmp al, 0x4d
jne 0x10002b21
cmp byte [ebx + ecx + 9], 0x41
jne 0x10002b21
cmp byte [ebx + ecx + 0xa], 0x50
jne 0x10002b21
mov dword [ebx + ecx + 0x14], 0x1d
jmp 0x10002c10
mov edi, 1
mov dword [ebx + ecx + 0x14], edi
mov ecx, dword [0x105ab568]
push 7
lea edx, [ebx + ecx + 8]
push str.S_START
push edx
call fcn.1000ce7a
add esp, 0xc
test eax, eax
jne 0x10002b4e
mov dword [ebp - 0x90], edi
mov eax, dword [0x105ab568]
push 5
lea ecx, [ebx + eax + 8]
push str.S_END
push ecx
call fcn.1000ce7a
add esp, 0xc
test eax, eax
jne 0x10002b71
mov dword [ebp - 0x90], esi
mov edx, dword [0x105ab568]
push 7
lea eax, [ebx + edx + 8]
push str.P_START
push eax
call fcn.1000ce7a
add esp, 0xc
test eax, eax
jne 0x10002b95
mov dword [ebp - 0x94], edi
mov ecx, dword [0x105ab568]
push 5
lea edx, [ebx + ecx + 8]
push str.P_END
push edx
call fcn.1000ce7a
add esp, 0xc
test eax, eax
jne 0x10002bb9
mov dword [ebp - 0x94], esi
mov eax, dword [0x105ab568]
push 7
lea ecx, [ebx + eax + 8]
push str.F_START
push ecx
call fcn.1000ce7a
add esp, 0xc
test eax, eax
jne 0x10002bdc
mov dword [ebp - 0x8c], edi
mov edx, dword [0x105ab568]
push 5
lea eax, [ebx + edx + 8]
push str.F_END
push eax
call fcn.1000ce7a
add esp, 0xc
test eax, eax
jne 0x10002c10
mov dword [ebp - 0x8c], esi
jmp 0x10002c10
mov ecx, dword [0x105ab568]
mov dword [ebx + ecx + 0x14], 0x1e
mov eax, dword [ebp - 0x98]
inc eax
add ebx, 0x18
mov dword [ebp - 0x98], eax
cmp eax, dword [0x10156d64]
jl 0x100024c0
push str.E2M1
call fcn.100010c8
add esp, 4
mov esi, 1
cmp eax, 0xffffd8f1
je 0x10002c51
mov dword [0x106e9564], esi
mov dword [0x106e9544], esi
push str.MAP20
call fcn.100010c8
add esp, 4
cmp eax, 0xffffd8f1
je 0x10002c75
mov dword [0x106e9564], esi
mov dword [0x106e9544], 2
push str.PLAYPAL
call fcn.100010c8
mov esi, eax
add esp, 4
cmp esi, 0xffffd8f1
je 0x10002da4
push 0x408
push 0x42
mov dword [0x106e9560], 1
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
mov dword [0x105ab650], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ebx, eax
mov dword [ebx], 0x1000300
mov edx, dword [0x105ab568]
push 0
lea ecx, [esi + esi*2]
mov eax, dword [edx + ecx*8]
mov ecx, dword [ebp - 0x88]
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov esi, 0x10031710
lea edi, [ebx + 4]
mov edx, dword [ebp - 0x88]
push 0
push 0x10156d38
push 3
push esi
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov byte [esi + 3], 0
mov eax, dword [esi]
mov dword [edi], eax
add esi, 4
add edi, 4
cmp esi, 0x10031b10
jl 0x10002ce1
push ebx
call dword [sym.imp.GDI32.dll_CreatePalette]
mov ecx, dword [0x105ab650]
push ecx
mov dword [0x10584430], eax
mov dword [0x106e9558], 1
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov edx, dword [0x10584424]
push edx
call dword [sym.imp.USER32.dll_GetDC]
mov ecx, dword [0x10584430]
push 0
push ecx
push eax
mov dword [0x1050f0b4], eax
call dword [sym.imp.GDI32.dll_SelectPalette]
mov edx, dword [0x1050f0b4]
push edx
call dword [sym.imp.GDI32.dll_RealizePalette]
mov eax, dword [0x105ab63c]
mov ecx, dword [0x1050f0b4]
mov esi, dword [sym.imp.GDI32.dll_SelectObject]
push eax
push ecx
call esi
mov edx, dword [0x1050f028]
mov dword [0x1063e230], eax
mov eax, dword [0x1050f0b4]
push edx
push eax
call esi
mov ecx, dword [0x1050f0b4]
mov edx, dword [0x10584424]
push ecx
push edx
mov dword [0x10031da4], eax
call dword [sym.imp.USER32.dll_ReleaseDC]
jmp 0x10002dae
mov dword [0x106e9560], 0
mov eax, dword [ebp - 0x88]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov eax, 1
pop ebx
call fcn.1000cdb1
mov esp, ebp
pop ebp
ret