Function at 0x401743
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov dword [ebp - 0x24], 0
mov dword [ebp - 0xc], 0
mov eax, dword [str.Dorm.dat]
mov dword [esp + 4], 0x407202
mov dword [esp], eax
call sym._fopen
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x401789
mov dword [esp], 0x407205
call sym._puts
mov eax, dword [ebp - 0xc]
jmp 0x401a43
mov dword [esp], 0x407221
call sym._puts
jmp 0x4017e1
mov dword [esp], 0x34
call sym._malloc
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x14]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 0x34
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sym._fread
mov eax, dword [ebp - 0x20]
mov dword [eax + 0x2c], 0
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x24]
mov dword [eax + 0x30], edx
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0xc]
and eax, 0x10
test eax, eax
je 0x401797
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._fclose
cmp dword [ebp - 0x24], 0
jne 0x401813
mov dword [esp], 0x40723d
call sym._puts
mov eax, dword [ebp - 0xc]
jmp 0x401a43
mov dword [esp], 0x407259
call sym._puts
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x24]
mov dword [eax], edx
add dword [ebp - 0xc], 4
mov eax, dword [str.stu.dat]
mov dword [esp + 4], 0x407202
mov dword [esp], eax
call sym._fopen
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x40185d
mov dword [esp], 0x407275
call sym._puts
mov eax, dword [ebp - 0xc]
jmp 0x401a43
mov dword [esp], 0x407293
call sym._puts
add dword [ebp - 0xc], 8
jmp 0x401905
mov dword [esp], 0x60
call sym._malloc
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x14]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 0x60
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym._fread
mov eax, dword [ebp - 0x1c]
mov dword [eax + 0x58], 0
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x20], eax
jmp 0x4018be
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0x30]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x4018dd
mov eax, dword [ebp - 0x1c]
lea edx, [eax + 0x39]
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._strcmp
test eax, eax
jne 0x4018b5
cmp dword [ebp - 0x20], 0
je 0x4018fa
mov eax, dword [ebp - 0x20]
mov edx, dword [eax + 0x2c]
mov eax, dword [ebp - 0x1c]
mov dword [eax + 0x5c], edx
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x1c]
mov dword [eax + 0x2c], edx
jmp 0x401905
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym._free
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0xc]
and eax, 0x10
test eax, eax
je 0x401872
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._fclose
mov eax, dword [str.charge.dat]
mov dword [esp + 4], 0x407202
mov dword [esp], eax
call sym._fopen
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x401953
mov dword [esp], 0x4072b1
call sym._puts
mov eax, dword [ebp - 0xc]
jmp 0x401a43
mov dword [esp], 0x4072cf
call sym._puts
add dword [ebp - 0xc], 0x10
jmp 0x401a24
mov dword [esp], 0x3c
call sym._malloc
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x14]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 0x3c
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sym._fread
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x10], 0
jmp 0x4019f0
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0x2c]
mov dword [ebp - 0x1c], eax
jmp 0x4019db
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._strcmp
test eax, eax
jne 0x4019d2
mov dword [ebp - 0x10], 1
jmp 0x4019e7
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0x5c]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x4019e7
cmp dword [ebp - 0x10], 0
je 0x4019b3
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0x30]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x4019fc
cmp dword [ebp - 0x10], 0
je 0x4019a8
cmp dword [ebp - 0x10], 0
je 0x401a19
mov eax, dword [ebp - 0x1c]
mov edx, dword [eax + 0x58]
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x38], edx
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
mov dword [eax + 0x58], edx
jmp 0x401a24
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sym._free
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0xc]
and eax, 0x10
test eax, eax
je 0x401968
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._fclose
mov eax, dword [ebp - 0xc]
leave
ret