Function at 0x404f00
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
xor eax, eax
push ebx
push esi
mov esi, dword [ebp + 0x18]
push edi
mov dword [ebp - 4], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
cmp esi, 0xa0498
jbe 0x404f3f
mov esi, 0xa0498
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 4]
lea edx, [ebp + 0x18]
mov dword [ebp - 8], esi
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x18], edx
cmp ebx, eax
je 0x40561c
cmp dword [ebp + 0xc], eax
je 0x40561c
mov edi, dword [ebp + 0x10]
cmp edi, eax
je 0x40561c
cmp dword [ebp + 0x14], 0xffffffff
je 0x40561c
push esi
call dword [sym.imp.MSVCR100.dll_malloc]
add esp, 4
mov dword [ebp + 0x18], eax
test eax, eax
jne 0x404fae
mov eax, dword [ebp + 0x20]
test eax, eax
je 0x404f95
mov dword [eax], 3
mov eax, dword [ebp + 0x24]
push eax
lea ecx, [ebp - 0x38]
push ecx
call fcn.00404cd0
add esp, 8
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
push esi
push 0
push eax
call sub.MSVCR100.dll_memset
mov eax, dword [ebp + 0x14]
mov edx, esi
push 2
neg edx
push edx
push eax
call dword [sym.imp.MSVCR100.dll__lseek]
add esp, 0x18
cmp eax, 0xffffffff
jne 0x404ff6
mov eax, dword [ebp + 0x20]
test eax, eax
je 0x404fdd
mov dword [eax], 0xd
mov ecx, dword [ebp + 0x24]
push ecx
lea edx, [ebp - 0x38]
push edx
call fcn.00404cd0
add esp, 8
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x14]
push esi
push eax
push ecx
call dword [sym.imp.MSVCR100.dll__read]
add esp, 0xc
cmp eax, 0xffffffff
je 0x40512c
cmp eax, esi
jne 0x40512c
mov esi, dword [ebp - 8]
add esi, 0xfffffff0
js 0x405091
mov eax, dword [ebp + 0x18]
mov ecx, esi
sub ecx, str.62F3AB0132FAVCSE
add ecx, eax
mov dword [ebp - 0xc], ecx
jmp 0x405040
mov dword [ebp + 8], 0x10
mov ecx, str.62F3AB0132FAVCSE
lea esp, [esp]
cmp dword [ebp + 8], 4
jb 0x405071
mov edx, dword [ebp - 0xc]
mov edx, dword [ecx + edx]
cmp edx, dword [ecx]
jne 0x405069
sub dword [ebp + 8], 4
add ecx, 4
jmp 0x405050
dec dword [ebp - 0xc]
dec esi
jns 0x405040
jmp 0x405091
mov ecx, dword [esi + eax]
mov dword [ebx + 0x4e], ecx
mov edx, dword [esi + eax + 4]
mov dword [ebx + 0x52], edx
mov ecx, dword [esi + eax + 8]
mov dword [ebx + 0x56], ecx
mov edx, dword [esi + eax + 0xc]
mov dword [ebx + 0x5a], edx
cmp esi, 0xffffffff
jne 0x4050a7
mov eax, dword [ebp + 0x20]
test eax, eax
je 0x404f95
mov dword [eax], 7
jmp 0x404f95
cmp esi, 0x15
jae 0x4050d2
mov eax, dword [ebp + 0x20]
test eax, eax
je 0x4050b9
mov dword [eax], 8
mov edx, dword [ebp + 0x24]
push edx
lea eax, [ebp - 0x38]
push eax
call fcn.00404cd0
add esp, 8
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 8]
sub ecx, esi
mov dword [edi], ecx
mov cl, byte [esi + eax - 1]
mov byte [ebx + 0x4d], cl
cmp cl, 0x42
jne 0x405319
movzx edx, byte [esi + eax - 2]
mov byte [ebx + 0x4c], dl
mov ecx, dword [esi + eax - 6]
mov dword [ebx + 0x48], ecx
movzx edx, byte [esi + eax - 7]
mov ecx, dword [ebp + 0xc]
mov byte [ebx + 0x44], dl
mov esi, dword [esi + eax - 0xb]
mov dword [ebx + 0x40], esi
mov eax, dword [edi]
add eax, esi
mov dword [ecx], eax
mov edx, dword [edi]
add edx, dword [ebx + 0x40]
mov eax, dword [ebp + 0x14]
push 2
neg edx
push edx
push eax
call dword [sym.imp.MSVCR100.dll__lseek]
add esp, 0xc
cmp eax, 0xffffffff
jne 0x405152
mov eax, dword [ebp + 0x20]
test eax, eax
je 0x405139
mov dword [eax], 0xd
mov ecx, dword [ebp + 0x24]
push ecx
lea edx, [ebp - 0x38]
push edx
call fcn.00404cd0
add esp, 8
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 8]
mov eax, dword [ebp + 0x18]
push esi
push 0
push eax
call sub.MSVCR100.dll_memset
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x14]
push esi
push ecx
push edx
call dword [sym.imp.MSVCR100.dll__read]
add esp, 0x18
cmp eax, 0xffffffff
jne 0x40518e
mov eax, dword [ebp + 0x20]
test eax, eax
je 0x404f95
mov dword [eax], 0xd
jmp 0x404f95
mov eax, dword [ebp + 0x18]
mov edx, dword [eax]
mov dword [ebx], edx
mov ecx, dword [eax + 4]
mov dword [ebx + 4], ecx
mov edx, dword [eax + 8]
mov dword [ebx + 8], edx
mov ecx, dword [eax + 0xc]
mov dword [ebx + 0xc], ecx
mov ecx, str.AVCS4F3A4200C37O
mov esi, ebx
mov edx, 0x10
sub esi, ecx
mov edi, dword [ecx + esi]
cmp edi, dword [ecx]
jne 0x4052c9
sub edx, 4
add ecx, 4
cmp edx, 4
jae 0x4051b5
movzx ecx, byte [eax + 0x10]
mov byte [ebx + 0x10], cl
mov edx, dword [eax + 0x11]
mov dword [ebx + 0x14], edx
movzx ecx, byte [eax + 0x15]
mov byte [ebx + 0x18], cl
mov edx, dword [eax + 0x16]
mov dword [ebx + 0x1c], edx
mov al, byte [eax + 0x1a]
mov byte [ebx + 0x20], al
mov esi, 0x27
lea edi, [ebx + 0x30]
mov dword [ebp + 8], 0
test al, al
je 0x405296
push 0x20
call dword [sym.imp.MSVCR100.dll_malloc]
add esp, 4
mov dword [edi], eax
test eax, eax
je 0x4052ef
xor ecx, ecx
mov dword [eax], ecx
mov dword [eax + 4], ecx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov dword [eax + 0x14], ecx
mov dword [eax + 0x18], ecx
mov dword [eax + 0x1c], ecx
mov ecx, dword [ebp + 0x18]
movzx edx, byte [esi + ecx]
mov eax, dword [edi]
mov byte [eax], dl
mov ecx, dword [ebp + 0x18]
movzx edx, byte [esi + ecx + 1]
mov eax, dword [edi]
mov byte [eax + 1], dl
mov ecx, dword [ebp + 0x18]
mov edx, dword [esi + ecx + 2]
mov eax, dword [edi]
mov dword [eax + 4], edx
mov ecx, dword [ebp + 0x18]
movzx edx, byte [esi + ecx + 6]
mov eax, dword [edi]
mov byte [eax + 8], dl
mov ecx, dword [ebp + 0x18]
mov edx, dword [esi + ecx + 7]
mov eax, dword [edi]
mov dword [eax + 0xc], edx
mov ecx, dword [ebp + 0x18]
movzx edx, byte [esi + ecx + 0xb]
mov eax, dword [edi]
mov byte [eax + 0x10], dl
mov eax, dword [ebp + 8]
movzx ecx, byte [ebx + 0x20]
mov edi, dword [edi]
inc eax
add esi, 0x14
add edi, 0x1c
mov dword [ebp + 8], eax
cmp ax, cx
jb 0x405202
mov eax, dword [ebp + 0x24]
push eax
lea ecx, [ebp - 0x38]
push ecx
call fcn.00404cd0
mov eax, 0x20
add esp, 8
cmp dword [ebx + 0x48], eax
ja 0x405606
cmp dword [ebx + 0x14], eax
ja 0x405606
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x20]
test eax, eax
je 0x4052d6
mov dword [eax], 7
mov edx, dword [ebp + 0x24]
push edx
lea eax, [ebp - 0x38]
push eax
call fcn.00404cd0
add esp, 8
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 0x24]
push edx
lea eax, [ebp - 0x38]
push eax
call fcn.00404cd0
mov eax, dword [ebp + 0x20]
add esp, 8
test eax, eax
je 0x405629
pop edi
pop esi
mov dword [eax], 3
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
cmp cl, 0x54
jne 0x4052c9
push 0x84
call dword [sym.imp.MSVCR100.dll_malloc]
add esp, 4
mov dword [ebp - 4], eax
test eax, eax
jne 0x405359
mov eax, dword [ebp + 0x20]
test eax, eax
je 0x405340
mov dword [eax], 3
mov ecx, dword [ebp + 0x24]
push ecx
lea edx, [ebp - 0x38]
push edx
call fcn.00404cd0
add esp, 8
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
push 0x84
push 0
push eax
call sub.MSVCR100.dll_memset
mov eax, dword [ebp - 4]
mov ecx, dword [ebx + 0x4e]
mov dword [eax + 0x71], ecx
mov edx, dword [ebx + 0x52]
mov dword [eax + 0x75], edx
mov ecx, dword [ebx + 0x56]
mov dword [eax + 0x79], ecx
mov edx, dword [ebx + 0x5a]
mov dword [eax + 0x7d], edx
mov al, byte [ebx + 0x4d]
mov ecx, dword [ebp - 4]
mov byte [ecx + 0x70], al
mov edx, dword [ebp + 0x18]
mov ax, word [esi + edx - 3]
mov ecx, dword [ebp - 4]
mov word [ecx + 0x6e], ax
mov eax, dword [ebp + 0x18]
mov edx, dword [esi + eax - 0xb]
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x66], edx
mov edx, dword [esi + eax - 7]
mov eax, dword [ebp - 4]
mov dword [eax + 0x6a], edx
mov ecx, dword [ebp + 0x18]
mov dx, word [esi + ecx - 0xd]
mov eax, dword [ebp - 4]
mov word [eax + 0x64], dx
mov eax, dword [ebp + 0x18]
mov ecx, dword [esi + eax - 0x15]
mov edx, dword [ebp - 4]
mov dword [edx + 0x5c], ecx
mov eax, dword [esi + eax - 0x11]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 0x24]
mov dword [ecx + 0x60], eax
mov eax, dword [ebp - 4]
push edx
add eax, 0x5c
push eax
call fcn.00406dd0
mov ecx, dword [edi]
mov edx, dword [ebp + 0xc]
add ecx, eax
mov dword [edx], ecx
mov ecx, dword [edi]
mov edx, dword [ebp + 0x14]
add ecx, eax
push 2
neg ecx
push ecx
push edx
call dword [sym.imp.MSVCR100.dll__lseek]
add esp, 0x20
cmp eax, 0xffffffff
je 0x405178
mov esi, dword [ebp - 8]
mov edx, dword [ebp + 0x18]
push esi
push 0
push edx
call sub.MSVCR100.dll_memset
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x14]
push esi
push eax
push ecx
call dword [sym.imp.MSVCR100.dll__read]
add esp, 0x18
cmp eax, 0xffffffff
jne 0x40545a
mov eax, dword [ebp + 0x20]
test eax, eax
je 0x405441
mov dword [eax], 0xd
mov edx, dword [ebp + 0x24]
push edx
lea eax, [ebp - 0x38]
push eax
call fcn.00404cd0
add esp, 8
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x18]
mov ecx, dword [eax]
mov edx, dword [ebp - 4]
mov dword [edx], ecx
mov ecx, dword [eax + 4]
mov edx, dword [ebp - 4]
mov dword [edx + 4], ecx
mov ecx, dword [eax + 8]
mov edx, dword [ebp - 4]
mov dword [edx + 8], ecx
mov eax, dword [eax + 0xc]
mov ecx, dword [ebp - 4]
mov dword [ecx + 0xc], eax
mov esi, dword [ebp - 4]
mov eax, str.AVCS4F3A4200C37O
mov edx, esi
mov ecx, 0x10
sub edx, eax
mov edi, dword [eax + edx]
cmp edi, dword [eax]
jne 0x4052c9
sub ecx, 4
add eax, 4
cmp ecx, 4
jae 0x405490
mov ecx, dword [ebp + 0x18]
movzx edx, word [ecx + 0x10]
mov word [esi + 0x10], dx
mov eax, dword [ebp + 0x18]
mov ecx, dword [eax + 0x12]
mov edx, dword [ebp - 4]
mov dword [edx + 0x12], ecx
mov eax, dword [eax + 0x16]
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x16], eax
mov edx, dword [ebp + 0x18]
mov ax, word [edx + 0x1a]
mov ecx, dword [ebp - 4]
mov word [ecx + 0x1a], ax
mov eax, dword [ebp + 0x18]
mov edx, dword [eax + 0x1c]
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x1c], edx
mov edx, dword [eax + 0x20]
mov eax, dword [ebp - 4]
mov dword [eax + 0x20], edx
mov ecx, dword [ebp + 0x18]
movzx edx, word [ecx + 0x24]
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 0x24]
mov word [eax + 0x24], dx
mov edx, dword [ebp - 4]
push ecx
add edx, 0x24
push edx
mov esi, 0x3e
call fcn.00406d40
mov edi, dword [ebp - 4]
movzx eax, al
xor ecx, ecx
add esp, 8
add edi, 0x40
mov dword [ebp + 8], 0
mov dword [ebp - 0xc], eax
cmp cx, ax
jae 0x4055c5
lea ecx, [ecx]
push 0x2c
call dword [sym.imp.MSVCR100.dll_malloc]
add esp, 4
mov dword [edi], eax
test eax, eax
je 0x4055f9
push 0x2c
push 0
push eax
call sub.MSVCR100.dll_memset
mov eax, dword [ebp + 0x18]
movzx ecx, word [esi + eax]
mov edx, dword [edi]
mov word [edx], cx
mov eax, dword [ebp + 0x18]
movzx ecx, word [esi + eax + 2]
mov edx, dword [edi]
mov word [edx + 2], cx
mov eax, dword [ebp + 0x18]
mov edx, dword [esi + eax + 4]
mov ecx, dword [edi]
mov dword [ecx + 4], edx
mov eax, dword [esi + eax + 8]
mov dword [ecx + 8], eax
mov edx, dword [ebp + 0x18]
mov ax, word [esi + edx + 0xc]
mov ecx, dword [edi]
mov word [ecx + 0xc], ax
mov eax, dword [ebp + 0x18]
mov edx, dword [esi + eax + 0xe]
mov ecx, dword [edi]
mov dword [ecx + 0xe], edx
mov eax, dword [esi + eax + 0x12]
mov dword [ecx + 0x12], eax
mov edx, dword [ebp + 0x18]
mov ecx, dword [edi]
mov al, byte [esi + edx + 0x16]
mov byte [ecx + 0x16], al
mov eax, dword [ebp + 8]
mov edi, dword [edi]
inc eax
add esp, 0xc
add esi, 0x27
add edi, 0x28
mov dword [ebp + 8], eax
cmp ax, word [ebp - 0xc]
jb 0x405530
mov esi, dword [ebp + 0x24]
mov eax, dword [ebp + 0x20]
mov ecx, dword [ebp - 4]
push esi
push eax
push ebx
push ecx
call fcn.00406e30
add esp, 0x10
test ax, ax
jne 0x405296
lea edx, [ebp - 0x38]
push esi
push edx
call fcn.00404cd0
add esp, 8
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0x24]
push ecx
lea edx, [ebp - 0x38]
push edx
jmp 0x4052f7
mov eax, dword [ebp + 0x20]
test eax, eax
je 0x405629
pop edi
pop esi
mov dword [eax], 8
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0x20]
cmp ecx, eax
je 0x405629
mov dword [ecx], 4
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret