Function at 0x10007e4d
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x70
mov dword [ebp - 4], 0
push ebx
push esi
push edi
mov ebx, ecx
cmp word [ebx + 0xdc], 0
je 0x10007e7a
mov eax, dword [ebx + 4]
cmp eax, 4
je 0x10007e7a
cmp eax, 5
jne 0x1000860a
mov eax, dword [ebx + 4]
test eax, eax
je 0x10007eb3
cmp eax, 1
je 0x10007f2f
cmp eax, 2
je 0x10008384
cmp eax, 3
je 0x1000838b
cmp eax, 4
je 0x100083c0
cmp eax, 5
je 0x10008437
jmp 0x10008600
push 0x180
mov ecx, dword [ebx + 0xc]
mov dword [ebx + 4], 1
push 0x8000
call fcn.10027de0
test eax, eax
jne 0x100085f1
mov ecx, dword [ebx + 0x100]
test ecx, ecx
je 0x10007ee3
push ebx
mov eax, dword [ecx]
call dword [eax]
cmp dword [ebx + 4], 1
je 0x10007ef5
mov dword [ebp - 4], 1
jmp 0x10008600
mov ecx, dword [ebx + 0xfc]
test ecx, ecx
je 0x10007f04
push ebx
mov eax, dword [ecx]
call dword [eax]
cmp dword [ebx + 4], 1
je 0x10007f16
mov dword [ebp - 4], 1
jmp 0x10008600
cmp dword [ebx + 0xc0], 0
je 0x10008600
mov dword [ebp - 4], 1
jmp 0x10008600
lea eax, [ebx + 0x14]
mov esi, str.content_type
mov dword [ebp - 0x24], eax
cmp dword [0x10034308], esi
mov dword [ebx + 0xe4], 0
mov dword [ebx + 4], 2
je 0x10007f94
test esi, esi
je 0x10007f94
mov edi, esi
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
mov edi, esi
call fcn.1001f710
add esp, 4
mov ecx, 0xffffffff
mov dword [ebp - 0x18], eax
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
mov edi, dword [ebp - 0x18]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x10007f9c
mov eax, dword [0x10034308]
mov dword [ebp - 0x18], eax
push 0
lea eax, [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x24]
add ecx, 4
call fcn.10020740
mov esi, eax
mov ecx, dword [0x10034308]
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x10007ff1
cmp eax, ecx
je 0x10007ff1
mov edx, eax
mov dl, byte [eax]
cmp byte [ecx], dl
jne 0x10007fe2
mov edx, eax
mov dl, byte [eax + 1]
cmp byte [ecx + 1], dl
jne 0x10007fe2
mov dl, byte [ecx + 2]
cmp byte [eax + 2], dl
jne 0x10007fe2
mov dl, byte [ecx + 3]
cmp byte [eax + 3], dl
je 0x10007ff1
push eax
call fcn.1001f730
add esp, 4
mov ecx, dword [0x10034308]
test esi, esi
jne 0x1000810f
push dword [ebx + 0xc]
call fcn.100280f0
add esp, 4
mov ecx, dword [0x10034308]
test eax, eax
je 0x1000810f
push eax
lea ecx, [ebp - 0x1c]
push ecx
mov esi, str.content_type
mov ecx, dword [ebp - 0x24]
add ecx, 4
call fcn.100213b0
mov eax, dword [0x10034308]
cmp eax, esi
je 0x10008071
test esi, esi
je 0x10008071
mov edi, esi
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
mov edi, esi
call fcn.1001f710
add esp, 4
mov ecx, 0xffffffff
mov dword [ebp - 0x14], eax
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
mov edi, dword [ebp - 0x14]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x10008074
mov dword [ebp - 0x14], eax
push 0
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x14]
push ecx
mov ecx, dword [ebp - 0x24]
add ecx, 4
call fcn.10020b80
mov edx, dword [ebp - 0x14]
mov ecx, dword [0x10034308]
test edx, edx
je 0x100080cf
cmp ecx, edx
je 0x100080cf
mov eax, edx
mov al, byte [edx]
cmp byte [ecx], al
jne 0x100080c0
mov eax, edx
mov al, byte [edx + 1]
cmp byte [ecx + 1], al
jne 0x100080c0
mov eax, edx
mov al, byte [edx + 2]
cmp byte [ecx + 2], al
jne 0x100080c0
mov eax, edx
mov al, byte [edx + 3]
cmp byte [ecx + 3], al
je 0x100080cf
push edx
call fcn.1001f730
add esp, 4
mov ecx, dword [0x10034308]
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x1000810f
cmp ecx, edx
je 0x1000810f
mov eax, edx
mov al, byte [edx]
cmp byte [ecx], al
jne 0x10008100
mov eax, edx
mov al, byte [edx + 1]
cmp byte [ecx + 1], al
jne 0x10008100
mov eax, edx
mov al, byte [edx + 2]
cmp byte [ecx + 2], al
jne 0x10008100
mov eax, edx
mov al, byte [edx + 3]
cmp byte [ecx + 3], al
je 0x1000810f
push edx
call fcn.1001f730
add esp, 4
mov ecx, dword [0x10034308]
mov esi, str.content_length
cmp ecx, esi
je 0x10008159
test esi, esi
je 0x10008159
mov edi, esi
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
mov edi, esi
call fcn.1001f710
add esp, 4
mov ecx, 0xffffffff
mov dword [ebp - 0x10], eax
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
mov edi, dword [ebp - 0x10]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x1000815c
mov dword [ebp - 0x10], ecx
push 0
lea eax, [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x24]
add ecx, 4
call fcn.10020740
mov esi, eax
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je 0x100081ab
cmp dword [0x10034308], ecx
je 0x100081ab
mov dl, byte [ecx]
mov edi, dword [0x10034308]
cmp byte [edi], dl
jne 0x100081a2
mov dl, byte [ecx + 1]
cmp byte [edi + 1], dl
jne 0x100081a2
mov dl, byte [ecx + 2]
cmp byte [edi + 2], dl
jne 0x100081a2
mov dl, byte [ecx + 3]
cmp byte [edi + 3], dl
je 0x100081ab
push ecx
call fcn.1001f730
add esp, 4
test esi, esi
jne 0x10008327
mov eax, dword [ebx + 0xc]
mov eax, dword [eax + 4]
cmp eax, 0xffffffff
jne 0x100081c7
mov dword [ebp - 0x20], 0xffffffff
jmp 0x100081d4
push eax
call dword [sym.imp.MSVCRT40.dll__filelength]
add esp, 4
mov dword [ebp - 0x20], eax
push 0xa
lea eax, [ebp - 0x70]
push eax
push dword [ebp - 0x20]
call dword [sym.imp.MSVCRT40.dll__ltoa]
add esp, 0xc
mov ecx, dword [0x10034308]
lea edx, [ebp - 0x70]
cmp ecx, edx
je 0x10008237
mov edi, edx
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
lea edi, [ebp - 0x70]
call fcn.1001f710
add esp, 4
mov ecx, 0xffffffff
mov dword [ebp - 8], eax
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
mov edi, dword [ebp - 8]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [0x10034308]
jmp 0x1000823a
mov dword [ebp - 8], ecx
mov esi, str.content_length
cmp ecx, esi
je 0x10008284
test esi, esi
je 0x10008284
mov edi, esi
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
mov edi, esi
call fcn.1001f710
add esp, 4
mov ecx, 0xffffffff
mov dword [ebp - 0xc], eax
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
mov edi, dword [ebp - 0xc]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x10008287
mov dword [ebp - 0xc], ecx
push 0
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 0xc]
push ecx
mov ecx, dword [ebp - 0x24]
add ecx, 4
call fcn.10020b80
mov edx, dword [ebp - 0xc]
test edx, edx
je 0x100082e2
mov eax, dword [0x10034308]
cmp edx, eax
je 0x100082e2
mov al, byte [eax]
cmp byte [edx], al
jne 0x100082d9
mov eax, dword [0x10034308]
mov al, byte [eax + 1]
cmp byte [edx + 1], al
jne 0x100082d9
mov eax, dword [0x10034308]
mov al, byte [eax + 2]
cmp byte [edx + 2], al
jne 0x100082d9
mov eax, dword [0x10034308]
mov al, byte [eax + 3]
cmp byte [edx + 3], al
je 0x100082e2
push edx
call fcn.1001f730
add esp, 4
mov ecx, dword [ebp - 8]
test ecx, ecx
je 0x1000831e
cmp dword [0x10034308], ecx
je 0x1000831e
mov dl, byte [ecx]
mov esi, dword [0x10034308]
cmp byte [esi], dl
jne 0x10008315
mov dl, byte [ecx + 1]
cmp byte [esi + 1], dl
jne 0x10008315
mov dl, byte [ecx + 2]
cmp byte [esi + 2], dl
jne 0x10008315
mov dl, byte [ecx + 3]
cmp byte [esi + 3], dl
je 0x1000831e
push ecx
call fcn.1001f730
add esp, 4
mov eax, dword [ebp - 0x20]
mov dword [ebx + 0xe0], eax
mov ecx, dword [ebx + 0x100]
test ecx, ecx
je 0x10008337
push ebx
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [ebx + 4], 2
je 0x10008349
mov dword [ebp - 4], 1
jmp 0x10008600
mov ecx, dword [ebx + 0xfc]
test ecx, ecx
je 0x10008359
push ebx
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [ebx + 4], 2
je 0x1000836b
mov dword [ebp - 4], 1
jmp 0x10008600
cmp dword [ebx + 0xc0], 0
je 0x10008600
mov dword [ebp - 4], 1
jmp 0x10008600
mov dword [ebx + 4], 3
lea esi, [ebx + 0x10c]
cmp dword [esi], 0
jne 0x100083a5
push 0x801
call fcn.1000c54f
add esp, 4
mov dword [esi], eax
mov ecx, dword [esi]
mov eax, dword [ebx + 0xc]
mov eax, dword [eax + 4]
cmp eax, 0xffffffff
jne 0x100084cc
mov edi, 0xffffffff
jmp 0x100084de
mov ecx, dword [ebx + 0x100]
test ecx, ecx
je 0x100083d0
push ebx
mov eax, dword [ecx]
call dword [eax + 0xc]
cmp dword [ebx + 4], 4
je 0x100083e2
mov dword [ebp - 4], 1
jmp 0x10008600
mov ecx, dword [ebx + 0xfc]
test ecx, ecx
je 0x100083f2
push ebx
mov eax, dword [ecx]
call dword [eax + 0xc]
cmp dword [ebx + 4], 4
je 0x10008404
mov dword [ebp - 4], 1
jmp 0x10008600
mov esi, dword [ebx + 0xc]
test esi, esi
je 0x1000842b
add esi, 4
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x1000842b
push eax
call dword [sym.imp.MSVCRT40.dll__close]
add esp, 4
mov dword [esi], 0xffffffff
call dword [sym.imp.MSVCRT40.dll__errno]
mov dword [ebx + 4], 5
jmp 0x10008600
mov esi, dword [ebx + 0xc]
test esi, esi
je 0x1000845e
add esi, 4
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x1000845e
push eax
call dword [sym.imp.MSVCRT40.dll__close]
add esp, 4
mov dword [esi], 0xffffffff
call dword [sym.imp.MSVCRT40.dll__errno]
lea ecx, [ebx + 0xe0]
mov eax, dword [ecx]
test eax, eax
je 0x10008472
cmp dword [ebx + 0xe4], eax
jle 0x1000847a
mov eax, dword [ebx + 0xe4]
mov dword [ecx], eax
mov ecx, dword [ebx + 0xfc]
test ecx, ecx
je 0x1000848a
push ebx
mov eax, dword [ecx]
call dword [eax + 0x10]
lea esi, [ebx + 0x100]
mov ecx, dword [esi]
test ecx, ecx
je 0x100084a7
mov eax, dword [ecx]
call dword [eax + 0x14]
test eax, eax
je 0x100084a7
mov ecx, dword [esi]
push ebx
mov eax, dword [ecx]
call dword [eax + 0x10]
push 0
mov ecx, ebx
call sym.NMOCOD.DLL_public:_void___thiscall_CNMDocBase::SetFileSpec_class_CNMFileSpec_const__
mov ecx, ebx
call sym.NMOCOD.DLL_public:_void___thiscall_CNMDocBase::ClearHeaders_void_
mov dword [ebp - 4], 1
mov word [ebx + 0xdc], 0
jmp 0x10008600
push 0x800
push ecx
push eax
call dword [sym.imp.MSVCRT40.dll__read]
add esp, 0xc
mov edi, eax
test edi, edi
jle 0x100085a8
push 0
lea ecx, [ebp - 0x34]
push edi
push dword [esi]
call fcn.100279b0
lea eax, [ebp - 0x34]
mov ecx, dword [ebx + 0x100]
mov dword [ebx + 0x10], eax
add dword [ebx + 0xe4], edi
mov eax, dword [0x10034700]
test ecx, ecx
je 0x10008519
push ebx
mov eax, dword [ecx]
call dword [eax + 8]
mov eax, dword [0x10034700]
cmp dword [ebx + 4], 3
je 0x10008549
mov dword [ebp - 4], 1
cmp dword [ebp - 0x2c], eax
je 0x10008600
cmp dword [ebp - 0x28], 0
je 0x10008600
push dword [ebp - 0x2c]
call fcn.1000c562
add esp, 4
jmp 0x10008600
mov ecx, dword [ebx + 0xfc]
test ecx, ecx
je 0x1000855e
push ebx
mov eax, dword [ecx]
call dword [eax + 8]
mov eax, dword [0x10034700]
cmp dword [ebx + 4], 3
je 0x1000858b
mov dword [ebp - 4], 1
cmp dword [ebp - 0x2c], eax
je 0x10008600
cmp dword [ebp - 0x28], 0
je 0x10008600
push dword [ebp - 0x2c]
call fcn.1000c562
add esp, 4
jmp 0x10008600
mov dword [ebx + 0x10], 0
cmp dword [ebp - 0x2c], eax
je 0x100085a8
cmp dword [ebp - 0x28], 0
je 0x100085a8
push dword [ebp - 0x2c]
call fcn.1000c562
add esp, 4
mov eax, dword [ebx + 0xc]
push dword [eax + 4]
call dword [sym.imp.MSVCRT40.dll__eof]
add esp, 4
test eax, eax
je 0x100085ce
cmp word [ebx + 0xdc], 0
jne 0x100085ce
mov dword [ebx + 4], 5
jmp 0x10008600
test edi, edi
jle 0x100085e4
cmp dword [ebx + 0xc0], 0
je 0x10008600
mov dword [ebp - 4], 1
jmp 0x10008600
call dword [sym.imp.MSVCRT40.dll__errno]
mov eax, dword [eax]
add eax, 0x76c
push eax
mov ecx, ebx
call sym.NMOCOD.DLL_public:_void___thiscall_CNMDocBase::SetFileError_enum_CNMFile::EError_
mov dword [ebx + 4], 4
cmp dword [ebp - 4], 0
je 0x10007e5f
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret