Function at 0x10005450
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [0x10049398]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
xor esi, esi
push esi
push 0x80000020
push 3
push esi
push 1
push 0x80000000
xor ebx, ebx
push eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x18], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push esi
push 0x1004aa58
mov edi, eax
push 4
lea eax, [ebp - 0xc]
push eax
push edi
mov dword [ebp - 0x28], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov byte [ebp - 8], bl
mov ecx, str.IWAD
lea eax, [ebp - 0xc]
lea ecx, [ecx]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x100054d0
test dl, dl
je 0x100054cc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x100054d0
add eax, 2
add ecx, 2
test dl, dl
jne 0x100054b0
xor eax, eax
jmp 0x100054d5
sbb eax, eax
or eax, 1
test eax, eax
je 0x1000550e
mov ecx, str.PWAD
lea eax, [ebp - 0xc]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x10005501
test dl, dl
je 0x100054fd
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x10005501
add eax, 2
add ecx, 2
test dl, dl
jne 0x100054e1
xor eax, eax
jmp 0x10005506
sbb eax, eax
or eax, 1
test eax, eax
jne 0x10005ca3
push 0
push 0x1004aa58
push 4
lea eax, [ebp - 0x2c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x2c]
push dword [0x1004b004]
mov dword [0x1004aa70], eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push dword [0x1004b004]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [0x1004aa70]
lea eax, [eax + eax*2]
add eax, 0x12c
shl eax, 3
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
mov dword [0x1004b004], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
push 0
push 0x1004aa58
mov dword [0x10442f6c], eax
push 4
lea eax, [ebp - 0x20]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
push 0
push dword [ebp - 0x20]
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [ebp - 0x20]
mov dword [0x1004af88], eax
mov dword [0x1004af8c], 0xc
mov dword [ebp - 0x24], ebx
cmp dword [0x1004aa70], ebx
jle 0x10005ca3
xor edx, edx
mov dword [ebp - 0x1c], edx
mov eax, dword [0x10442f6c]
push 0
push 0x1004aa58
push 0x10
add eax, edx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [ebp - 0x1c]
mov ecx, dword [0x10442f6c]
mov eax, dword [ecx + edx + 4]
add dword [0x1004af8c], eax
mov byte [ecx + edx + 0x10], 0
add edx, dword [0x10442f6c]
mov edi, dword [edx + 4]
test edi, edi
jle 0x10005623
test ebx, ebx
je 0x10005601
mov dword [edx + 0x14], 0xc
jmp 0x10005c84
test esi, esi
je 0x10005611
mov dword [edx + 0x14], 0xd
jmp 0x10005c84
cmp dword [ebp - 0x18], 0
je 0x10005623
mov dword [edx + 0x14], 0xe
jmp 0x10005c84
mov bh, byte [edx + 8]
lea esi, [edx + 8]
cmp bh, 0x44
jne 0x1000566e
cmp byte [edx + 9], 0x53
jne 0x10005640
mov dword [edx + 0x14], 0x10
jmp 0x10005c7e
cmp bh, 0x44
jne 0x1000566e
cmp byte [edx + 9], 0x50
jne 0x10005657
mov dword [edx + 0x14], 0x11
jmp 0x10005c7e
cmp bh, 0x44
jne 0x1000566e
cmp byte [edx + 9], 0x5f
jne 0x1000566e
mov dword [edx + 0x14], 0xf
jmp 0x10005c7e
cmp bh, 0x57
jne 0x10005685
cmp byte [edx + 9], 0x49
jne 0x10005685
mov dword [edx + 0x14], 0x1a
jmp 0x10005c7e
cmp bh, 0x4d
jne 0x1000569c
cmp byte [edx + 9], 0x5f
jne 0x1000569c
mov dword [edx + 0x14], 0x1b
jmp 0x10005c7e
cmp bh, 0x53
jne 0x100056b3
cmp byte [edx + 9], 0x54
jne 0x100056b3
mov dword [edx + 0x14], 0x19
jmp 0x10005c7e
cmp bh, 0x44
jne 0x100056d6
cmp byte [edx + 9], 0x45
jne 0x100056d6
cmp byte [edx + 0xa], 0x4d
jne 0x100056d6
cmp byte [edx + 0xb], 0x4f
jne 0x100056d6
mov dword [edx + 0x14], 0x16
jmp 0x10005c7e
cmp bh, 0x50
jne 0x100056f9
cmp byte [edx + 9], 0x4e
jne 0x100056f9
cmp byte [edx + 0xa], 0x41
jne 0x100056f9
cmp byte [edx + 0xb], 0x4d
jne 0x100056f9
mov dword [edx + 0x14], 0x17
jmp 0x10005c7e
mov ecx, str.PLAYPAL
mov eax, esi
mov bl, byte [eax]
cmp bl, byte [ecx]
jne 0x10005720
test bl, bl
je 0x1000571c
mov bl, byte [eax + 1]
cmp bl, byte [ecx + 1]
jne 0x10005720
add eax, 2
add ecx, 2
test bl, bl
jne 0x10005700
xor eax, eax
jmp 0x10005725
sbb eax, eax
or eax, 1
test eax, eax
jne 0x10005735
mov dword [edx + 0x14], 0x13
jmp 0x10005c7e
mov ecx, str.COLORMAP
mov eax, esi
lea esp, [esp]
mov bl, byte [eax]
cmp bl, byte [ecx]
jne 0x10005760
test bl, bl
je 0x1000575c
mov bl, byte [eax + 1]
cmp bl, byte [ecx + 1]
jne 0x10005760
add eax, 2
add ecx, 2
test bl, bl
jne 0x10005740
xor eax, eax
jmp 0x10005765
sbb eax, eax
or eax, 1
test eax, eax
jne 0x10005775
mov dword [edx + 0x14], 0x14
jmp 0x10005c7e
cmp bh, 0x54
jne 0x100057a3
cmp byte [edx + 9], 0x45
jne 0x100057a3
cmp byte [edx + 0xa], 0x58
jne 0x100057a3
cmp byte [edx + 0xb], bh
jne 0x100057a3
cmp byte [edx + 0xc], 0x55
jne 0x100057a3
cmp byte [edx + 0xd], 0x52
jne 0x100057a3
mov dword [edx + 0x14], 0x12
jmp 0x10005c7e
mov ecx, str.THINGS
mov eax, esi
lea ebx, [ebx]
mov bl, byte [eax]
cmp bl, byte [ecx]
jne 0x100057d0
test bl, bl
je 0x100057cc
mov bl, byte [eax + 1]
cmp bl, byte [ecx + 1]
jne 0x100057d0
add eax, 2
add ecx, 2
test bl, bl
jne 0x100057b0
xor eax, eax
jmp 0x100057d5
sbb eax, eax
or eax, 1
test eax, eax
jne 0x100057e5
mov dword [edx + 0x14], 2
jmp 0x10005c7e
mov ecx, str.LINEDEFS
mov eax, esi
lea esp, [esp]
mov bl, byte [eax]
cmp bl, byte [ecx]
jne 0x10005810
test bl, bl
je 0x1000580c
mov bl, byte [eax + 1]
cmp bl, byte [ecx + 1]
jne 0x10005810
add eax, 2
add ecx, 2
test bl, bl
jne 0x100057f0
xor eax, eax
jmp 0x10005815
sbb eax, eax
or eax, 1
test eax, eax
jne 0x10005825
mov dword [edx + 0x14], 3
jmp 0x10005c7e
mov ecx, str.SIDEDEFS
mov eax, esi
lea esp, [esp]
mov bl, byte [eax]
cmp bl, byte [ecx]
jne 0x10005850
test bl, bl
je 0x1000584c
mov bl, byte [eax + 1]
cmp bl, byte [ecx + 1]
jne 0x10005850
add eax, 2
add ecx, 2
test bl, bl
jne 0x10005830
xor eax, eax
jmp 0x10005855
sbb eax, eax
or eax, 1
test eax, eax
jne 0x10005865
mov dword [edx + 0x14], 4
jmp 0x10005c7e
mov ecx, str.VERTEXES
mov eax, esi
lea esp, [esp]
mov bl, byte [eax]
cmp bl, byte [ecx]
jne 0x10005890
test bl, bl
je 0x1000588c
mov bl, byte [eax + 1]
cmp bl, byte [ecx + 1]
jne 0x10005890
add eax, 2
add ecx, 2
test bl, bl
jne 0x10005870
xor eax, eax
jmp 0x10005895
sbb eax, eax
or eax, 1
test eax, eax
jne 0x100058a5
mov dword [edx + 0x14], 5
jmp 0x10005c7e
mov ecx, str.SEGS
mov eax, esi
lea esp, [esp]
mov bl, byte [eax]
cmp bl, byte [ecx]
jne 0x100058d0
test bl, bl
je 0x100058cc
mov bl, byte [eax + 1]
cmp bl, byte [ecx + 1]
jne 0x100058d0
add eax, 2
add ecx, 2
test bl, bl
jne 0x100058b0
xor eax, eax
jmp 0x100058d5
sbb eax, eax
or eax, 1
test eax, eax
jne 0x100058e5
mov dword [edx + 0x14], 6
jmp 0x10005c7e
mov ecx, str.SSECTORS
mov eax, esi
lea esp, [esp]
mov bl, byte [eax]
cmp bl, byte [ecx]
jne 0x10005910
test bl, bl
je 0x1000590c
mov bl, byte [eax + 1]
cmp bl, byte [ecx + 1]
jne 0x10005910
add eax, 2
add ecx, 2
test bl, bl
jne 0x100058f0
xor eax, eax
jmp 0x10005915
sbb eax, eax
or eax, 1
test eax, eax
jne 0x10005925
mov dword [edx + 0x14], 7
jmp 0x10005c7e
mov ecx, str.NODES
mov eax, esi
lea esp, [esp]
mov bl, byte [eax]
cmp bl, byte [ecx]
jne 0x10005950
test bl, bl
je 0x1000594c
mov bl, byte [eax + 1]
cmp bl, byte [ecx + 1]
jne 0x10005950
add eax, 2
add ecx, 2
test bl, bl
jne 0x10005930
xor eax, eax
jmp 0x10005955
sbb eax, eax
or eax, 1
test eax, eax
jne 0x10005965
mov dword [edx + 0x14], 8
jmp 0x10005c7e
mov ecx, str.SECTORS
mov eax, esi
lea esp, [esp]
mov bl, byte [eax]
cmp bl, byte [ecx]
jne 0x10005990
test bl, bl
je 0x1000598c
mov bl, byte [eax + 1]
cmp bl, byte [ecx + 1]
jne 0x10005990
add eax, 2
add ecx, 2
test bl, bl
jne 0x10005970
xor eax, eax
jmp 0x10005995
sbb eax, eax
or eax, 1
test eax, eax
jne 0x100059a5
mov dword [edx + 0x14], 9
jmp 0x10005c7e
mov ecx, str.REJECT
mov eax, esi
lea esp, [esp]
mov bl, byte [eax]
cmp bl, byte [ecx]
jne 0x100059d0
test bl, bl
je 0x100059cc
mov bl, byte [eax + 1]
cmp bl, byte [ecx + 1]
jne 0x100059d0
add eax, 2
add ecx, 2
test bl, bl
jne 0x100059b0
xor eax, eax
jmp 0x100059d5
sbb eax, eax
or eax, 1
test eax, eax
jne 0x100059e5
mov dword [edx + 0x14], 0xa
jmp 0x10005c7e
mov ecx, str.BLOCKMAP
mov eax, esi
lea esp, [esp]
mov bl, byte [eax]
cmp bl, byte [ecx]
jne 0x10005a10
test bl, bl
je 0x10005a0c
mov bl, byte [eax + 1]
cmp bl, byte [ecx + 1]
jne 0x10005a10
add eax, 2
add ecx, 2
test bl, bl
jne 0x100059f0
xor eax, eax
jmp 0x10005a15
sbb eax, eax
or eax, 1
test eax, eax
jne 0x10005a25
mov dword [edx + 0x14], 0xb
jmp 0x10005c7e
mov ecx, str.PLATFORM
mov eax, esi
lea esp, [esp]
mov bl, byte [eax]
cmp bl, byte [ecx]
jne 0x10005a50
test bl, bl
je 0x10005a4c
mov bl, byte [eax + 1]
cmp bl, byte [ecx + 1]
jne 0x10005a50
add eax, 2
add ecx, 2
test bl, bl
jne 0x10005a30
xor eax, eax
jmp 0x10005a55
sbb eax, eax
or eax, 1
test eax, eax
je 0x10005c77
mov ecx, str.TAGDESC
mov eax, esi
mov bl, byte [eax]
cmp bl, byte [ecx]
jne 0x10005a84
test bl, bl
je 0x10005a80
mov bl, byte [eax + 1]
cmp bl, byte [ecx + 1]
jne 0x10005a84
add eax, 2
add ecx, 2
test bl, bl
jne 0x10005a64
xor eax, eax
jmp 0x10005a89
sbb eax, eax
or eax, 1
test eax, eax
je 0x10005c77
mov eax, str.ENDOOM
mov cl, byte [esi]
cmp cl, byte [eax]
jne 0x10005ab6
test cl, cl
je 0x10005ab2
mov cl, byte [esi + 1]
cmp cl, byte [eax + 1]
jne 0x10005ab6
add esi, 2
add eax, 2
test cl, cl
jne 0x10005a96
xor eax, eax
jmp 0x10005abb
sbb eax, eax
or eax, 1
test eax, eax
jne 0x10005acb
mov dword [edx + 0x14], 0x15
jmp 0x10005c7e
test edi, edi
jne 0x10005c6e
cmp bh, 0x45
jne 0x10005ae4
cmp byte [edx + 0xa], 0x4d
jne 0x10005ae4
cmp byte [edx + 0xc], 0
je 0x10005af5
cmp bh, 0x4d
jne 0x10005b01
cmp byte [edx + 9], 0x41
jne 0x10005b01
cmp byte [edx + 0xa], 0x50
jne 0x10005b01
mov dword [edx + 0x14], 0x1d
jmp 0x10005c7e
mov ecx, dword [ebp - 0x1c]
mov dword [edx + 0x14], 1
mov esi, dword [0x10442f6c]
add ecx, 8
add esi, ecx
mov ecx, str.S_START
mov eax, esi
lea ecx, [ecx]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x10005b40
test dl, dl
je 0x10005b3c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x10005b40
add eax, 2
add ecx, 2
test dl, dl
jne 0x10005b20
xor eax, eax
jmp 0x10005b45
sbb eax, eax
or eax, 1
mov ebx, dword [ebp - 0x14]
test eax, eax
mov eax, 1
cmove ebx, eax
mov ecx, str.S_END
mov eax, esi
lea esp, [esp]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x10005b80
test dl, dl
je 0x10005b7c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x10005b80
add eax, 2
add ecx, 2
test dl, dl
jne 0x10005b60
xor eax, eax
jmp 0x10005b85
sbb eax, eax
or eax, 1
xor ecx, ecx
test eax, eax
cmove ebx, ecx
mov dword [ebp - 0x14], ebx
mov ecx, str.P_START
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x10005bb6
test dl, dl
je 0x10005bb2
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x10005bb6
add eax, 2
add ecx, 2
test dl, dl
jne 0x10005b96
xor eax, eax
jmp 0x10005bbb
sbb eax, eax
or eax, 1
mov edi, dword [ebp - 0x10]
test eax, eax
mov eax, 1
cmove edi, eax
mov ecx, str.P_END
mov eax, esi
nop
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x10005bf0
test dl, dl
je 0x10005bec
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x10005bf0
add eax, 2
add ecx, 2
test dl, dl
jne 0x10005bd0
xor eax, eax
jmp 0x10005bf5
sbb eax, eax
or eax, 1
xor ecx, ecx
test eax, eax
cmove edi, ecx
mov dword [ebp - 0x10], edi
mov ecx, str.F_START
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x10005c26
test dl, dl
je 0x10005c22
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x10005c26
add eax, 2
add ecx, 2
test dl, dl
jne 0x10005c06
xor eax, eax
jmp 0x10005c2b
sbb eax, eax
or eax, 1
mov edi, dword [ebp - 0x18]
test eax, eax
mov eax, 1
cmove edi, eax
mov dword [ebp - 0x18], edi
mov eax, str.F_END
mov cl, byte [esi]
cmp cl, byte [eax]
jne 0x10005c60
test cl, cl
je 0x10005c5c
mov cl, byte [esi + 1]
cmp cl, byte [eax + 1]
jne 0x10005c60
add esi, 2
add eax, 2
test cl, cl
jne 0x10005c40
xor eax, eax
jmp 0x10005c65
sbb eax, eax
or eax, 1
test eax, eax
jne 0x10005c81
mov dword [ebp - 0x18], eax
jmp 0x10005c81
mov dword [edx + 0x14], 0x1c
jmp 0x10005c7e
mov dword [edx + 0x14], 0x1e
mov ebx, dword [ebp - 0x14]
mov esi, dword [ebp - 0x10]
mov eax, dword [ebp - 0x24]
mov edx, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x28]
inc eax
add edx, 0x18
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x1c], edx
cmp eax, dword [0x1004aa70]
jl 0x100055b4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1000f362
mov esp, ebp
pop ebp
ret