Function at 0x40367a
Capabilities:
Read file via mapping

Disassembly:
push 0xa70
push 0x408400
call fcn.004082b0
mov edi, ecx
mov dword [ebp - 0xa80], edi
xor ebx, ebx
mov byte [ebp - 0xa4d], bl
mov dword [ebp - 0xa5c], ebx
mov dword [ebp - 0xa58], ebx
push 0xa28
push ebx
lea eax, [ebp - 0xa4c]
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0xa4c]
mov dword [ebp - 0xa6c], eax
mov ecx, edi
call fcn.00403c3f
test eax, eax
jns 0x4036e9
mov dword [edi + 0x20], 1
mov ecx, edi
call fcn.00403c3f
mov esi, eax
test esi, esi
js 0x4039a7
call fcn.00402e6e
mov esi, eax
test esi, esi
js 0x4039a7
mov ecx, ebx
mov al, cl
mov edx, dword [ebp - 0xa5c]
test al, al
jne 0x403983
cmp dword [edi + 4], 0
jne 0x40371a
inc al
mov byte [ebp - 0xa4d], al
jmp 0x403702
push dword [edi + 4]
push edx
push dword [ebp - 0xa58]
push 4
push dword [edi + 0x28]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ecx, eax
mov dword [ebp - 0xa68], ecx
mov dword [ebp - 0xa7c], ecx
test ecx, ecx
jne 0x40378f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x403756
movzx esi, si
or esi, 0x80070000
cmp dword [edi + 0x20], 2
je 0x403918
mov al, 1
mov byte [ebp - 0xa4d], al
mov ecx, dword [ebp - 0xa68]
jmp 0x4036fc
mov edx, ebx
mov dword [ebp - 0xa5c], edx
mov dword [ebp - 0xa58], ebx
mov ecx, dword [ebp - 0xa68]
mov al, byte [ebp - 0xa4d]
jmp 0x403702
mov edx, ecx
mov dword [ebp - 0xa60], edx
mov dword [ebp - 4], ebx
mov eax, dword [edi]
test eax, eax
jne 0x40388a
mov eax, dword [edi + 4]
add eax, ecx
cmp edx, eax
jae 0x403888
mov al, byte [edx]
mov byte [ebp - 0xa61], al
test al, al
je 0x40381f
cmp al, 0xa
je 0x40381f
cmp al, 0xd
je 0x40381f
mov ecx, dword [ebp - 0xa6c]
mov eax, ecx
lea edx, [ebp - 0xa4c]
sub eax, edx
cmp eax, 0xa28
mov edx, dword [ebp - 0xa60]
jb 0x4037f3
mov al, byte [ebp - 0xa61]
mov byte [ecx], al
inc ecx
mov dword [ebp - 0xa6c], ecx
jmp 0x403870
mov byte [ecx], bl
push ecx
lea edx, [ebp - 0xa4c]
mov ecx, edi
call fcn.00404e0e
mov esi, eax
mov dword [ebp - 0xa70], esi
lea eax, [ebp - 0xa4c]
mov dword [ebp - 0xa6c], eax
mov edx, dword [ebp - 0xa60]
jmp 0x40387d
lea eax, [ebp - 0xa4c]
mov ecx, dword [ebp - 0xa6c]
cmp ecx, eax
jbe 0x403870
mov eax, ecx
lea edx, [ebp - 0xa4c]
sub eax, edx
cmp eax, 0xa28
mov edx, dword [ebp - 0xa60]
jae 0x403864
mov byte [ecx], bl
push ecx
lea edx, [ebp - 0xa4c]
mov ecx, edi
call fcn.00404e0e
mov esi, eax
mov dword [ebp - 0xa70], esi
mov edx, dword [ebp - 0xa60]
lea eax, [ebp - 0xa4c]
mov dword [ebp - 0xa6c], eax
inc edx
mov dword [ebp - 0xa74], edx
mov dword [ebp - 0xa60], edx
mov ecx, dword [ebp - 0xa68]
jmp 0x40379a
mov eax, dword [edi]
mov dword [ebp - 4], 0xfffffffe
test eax, eax
jne 0x40392e
mov eax, dword [edi + 4]
cmp dword [edi + 0x30], eax
jne 0x4038fb
mov edx, dword [ebp - 0xa5c]
add edx, eax
mov dword [ebp - 0xa5c], edx
adc dword [ebp - 0xa58], ebx
mov eax, dword [edi + 0x18]
sub eax, edx
mov dword [ebp - 0xa60], eax
mov eax, dword [edi + 0x1c]
sbb eax, dword [ebp - 0xa58]
cmp eax, ebx
mov al, byte [ebp - 0xa4d]
jg 0x403702
jl 0x4038ee
mov eax, dword [ebp - 0xa60]
cmp eax, dword [edi + 0x30]
mov al, byte [ebp - 0xa4d]
jae 0x403702
mov eax, dword [edi + 0x18]
sub eax, edx
mov dword [edi + 4], eax
jmp 0x403784
cmp dword [edi + 0x20], 2
jne 0x40392e
push ecx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
test eax, eax
jne 0x403912
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xa68], ebx
mov ecx, edi
call fcn.00403de6
mov esi, eax
test esi, esi
jns 0x403770
jmp 0x403760
mov al, 1
mov byte [ebp - 0xa4d], al
jmp 0x4036fc
test ecx, ecx
je 0x4039a7
push ecx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
test eax, eax
jne 0x4039a7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x4039a7
movzx esi, si
or esi, 0x80070000
mov edx, dword [edi + 0x24]
mov ecx, dword [edi + 0x28]
call fcn.00403d88
mov eax, esi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
leave
ret