Function at 0x40ecf0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x10
push ebx
push ebp
push esi
push edi
push 0
push 0xe7b
push str.c:projects_storm_sourceSFile.cpp
push 0x1000
mov dword [esp + 0x2c], edx
mov ebp, ecx
call fcn.00408660
mov edi, eax
xor ebx, ebx
mov dword [esp + 0x14], edi
xor edx, edx
lea ecx, [ecx]
mov esi, dword [ebp + 0x12c]
lea eax, [edx + ebx]
cmp esi, eax
jb 0x40ed81
mov ecx, dword [ebp + 0x10c]
push 0
push 0
push esi
push ecx
mov ebx, esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [ebp + 0x10c]
push 0
lea edx, [esp + 0x14]
push edx
push 0x1000
push edi
push eax
mov dword [esp + 0x24], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x10]
cmp eax, 0x20
jb 0x40edc4
mov esi, dword [ebp + 0x12c]
mov edx, dword [ebp + 0x130]
lea ecx, [esi + 0x20]
cmp ecx, edx
jae 0x40edc4
mov edx, eax
sub esi, ebx
add esi, edi
mov edi, dword [ebp + 0x134]
mov ecx, 8
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp + 0x134]
cmp dword [eax], 0x1a51504d
jne 0x40edaa
cmp dword [eax + 4], 0x20
jae 0x40ee8e
mov eax, dword [ebp + 0x12c]
mov edi, dword [esp + 0x14]
add eax, 0x200
mov dword [ebp + 0x12c], eax
jmp 0x40ed20
mov eax, dword [ebp + 0x10c]
cmp eax, 0xffffffff
je 0x40ede0
mov ecx, dword [ebp + 0x148]
test ecx, ecx
jne 0x40ede0
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 0x124]
test eax, eax
je 0x40edfc
push 0
push 0xd6
push str.c:projects_storm_sourceSFile.cpp
push eax
call fcn.004093e0
mov eax, dword [ebp + 0x134]
test eax, eax
je 0x40ee18
push 0
push 0xd7
push str.c:projects_storm_sourceSFile.cpp
push eax
call fcn.004093e0
mov eax, dword [ebp + 0x138]
test eax, eax
je 0x40ee34
push 0
push 0xde
push str.c:projects_storm_sourceSFile.cpp
push eax
call fcn.004093e0
mov eax, dword [ebp + 0x13c]
test eax, eax
je 0x40ee50
push 0
push 0xdf
push str.c:projects_storm_sourceSFile.cpp
push eax
call fcn.004093e0
mov ecx, ebp
call fcn.00403eb0
push 0
push 0xffffffffffffffff
push str.delete
push ebp
call fcn.004093e0
push 0x8510006c
call fcn.0040b130
push 0
push 0xe98
push str.c:projects_storm_sourceSFile.cpp
push edi
call fcn.004093e0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret 8
mov edx, dword [esp + 0x14]
push 0
push 0xebf
push str.c:projects_storm_sourceSFile.cpp
push edx
call fcn.004093e0
mov ecx, dword [ebp + 0x134]
mov cl, byte [ecx + 0xe]
push 0
mov eax, 0x200
shl eax, cl
push 0xec4
push str.c:projects_storm_sourceSFile.cpp
push eax
mov dword [ebp + 0x120], eax
call fcn.00408660
mov edx, dword [ebp + 0x134]
push 0
mov dword [ebp + 0x124], eax
mov eax, dword [edx + 0x18]
push 0xecd
push str.c:projects_storm_sourceSFile.cpp
shl eax, 4
push eax
call fcn.00408660
mov ecx, dword [ebp + 0x134]
lea esi, [ebp + 8]
push esi
mov dword [ebp + 0x13c], eax
lea esi, [esp + 0x1c]
push esi
mov esi, dword [ecx + 0x18]
mov ecx, dword [ecx + 0x10]
shl esi, 4
push esi
push eax
mov eax, dword [ebp + 0x10c]
push eax
mov eax, dword [ebp + 0x12c]
lea edx, [ebp + 0x140]
add ecx, eax
call fcn.0040c6a0
mov ebx, str._hash_table_
mov esi, 0x7fed7fed
mov edi, 0xeeeeeeee
lea esp, [esp]
mov al, byte [ebx]
test al, al
je 0x40ef76
movsx eax, al
push eax
inc ebx
call dword [sym.imp.MSVCRT.dll_toupper]
mov edx, dword [0x42a3b4]
lea ecx, [edi + esi]
imul edi, edi, 0x21
movsx eax, al
mov esi, dword [edx + eax*4 + 0xc00]
xor esi, ecx
add edi, eax
add esp, 4
test ebx, ebx
lea edi, [edi + esi + 3]
jne 0x40ef40
mov eax, dword [ebp + 0x134]
mov edx, dword [eax + 0x18]
mov ecx, dword [ebp + 0x13c]
push esi
shl edx, 4
call fcn.0040c5b0
mov ecx, dword [ebp + 0x134]
mov edx, dword [ecx + 0x1c]
imul edx, edx, 0x1c
push 0
push 0xee6
push str.c:projects_storm_sourceSFile.cpp
push edx
call fcn.00408660
mov ecx, dword [ebp + 0x134]
lea edx, [ebp + 8]
push edx
mov dword [ebp + 0x138], eax
lea edx, [esp + 0x1c]
push edx
mov edx, dword [ecx + 0x1c]
mov ecx, dword [ecx + 0x14]
shl edx, 4
push edx
push eax
mov eax, dword [ebp + 0x10c]
push eax
add ecx, dword [ebp + 0x12c]
lea edx, [ebp + 0x140]
call fcn.0040c6a0
mov ebx, str._block_table_
mov esi, 0x7fed7fed
mov edi, 0xeeeeeeee
mov al, byte [ebx]
test al, al
je 0x40f029
movsx eax, al
push eax
inc ebx
call dword [sym.imp.MSVCRT.dll_toupper]
mov edx, dword [0x42a3b4]
lea ecx, [edi + esi]
imul edi, edi, 0x21
movsx eax, al
mov esi, dword [edx + eax*4 + 0xc00]
xor esi, ecx
add edi, eax
add esp, 4
test ebx, ebx
lea edi, [edi + esi + 3]
jne 0x40eff3
mov eax, dword [ebp + 0x134]
mov edx, dword [eax + 0x1c]
mov ecx, dword [ebp + 0x138]
push esi
shl edx, 4
call fcn.0040c5b0
mov ecx, dword [ebp + 0x134]
mov edx, dword [ecx + 0x1c]
mov ecx, dword [ebp + 0x138]
call fcn.0040f190
mov eax, dword [ebp + 0x12c]
test eax, eax
je 0x40f09a
mov edx, dword [ebp + 0x134]
mov eax, dword [edx + 0x1c]
xor esi, esi
test eax, eax
jbe 0x40f09a
xor edx, edx
mov eax, dword [ebp + 0x138]
mov ecx, dword [eax + edx]
add eax, edx
test ecx, ecx
je 0x40f089
mov edi, dword [ebp + 0x12c]
add edi, ecx
mov dword [eax], edi
mov ecx, dword [ebp + 0x134]
mov eax, dword [ecx + 0x1c]
inc esi
add edx, 0x1c
cmp esi, eax
jb 0x40f070
mov eax, dword [0x42a388]
test eax, eax
jle 0x40f0c3
mov ecx, dword [ebp + 0x114]
lea esp, [esp]
cmp dword [eax + 0x114], ecx
jle 0x40f0c5
mov eax, dword [eax + 4]
test eax, eax
jle 0x40f0c3
jne 0x40f0b0
jmp 0x40f0c5
xor eax, eax
mov esi, dword [ebp]
test esi, esi
je 0x40f0f9
mov edx, dword [ebp + 4]
test edx, edx
jg 0x40f0d7
not edx
jmp 0x40f0e0
mov edi, dword [esi + 4]
mov ecx, ebp
sub ecx, edi
add edx, ecx
mov dword [edx], esi
mov edx, dword [ebp]
mov ecx, dword [ebp + 4]
mov dword [edx + 4], ecx
mov dword [ebp], 0
mov dword [ebp + 4], 0
test eax, eax
jne 0x40f102
mov eax, 0x42a384
mov ecx, dword [eax]
mov dword [ebp], ecx
mov edx, dword [ecx + 4]
mov dword [ebp + 4], edx
mov dword [ecx + 4], ebp
mov dword [eax], ebp
mov eax, dword [ebp + 0x110]
test eax, eax
je 0x40f163
call fcn.0040b660
mov eax, dword [esp + 0x28]
push 0x42a320
mov dword [eax], ebp
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp + 0x134]
mov edx, dword [ecx + 0x1c]
push edx
mov edx, dword [ebp + 0x138]
mov ecx, ebp
call fcn.0040f1f0
push 0x42a320
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x10
ret 8
test byte [esp + 0x1c], 1
je 0x40f121
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x40f121
push ebp
call fcn.0040d9b0
push 0xf
call fcn.0040b130
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret 8