Function at 0x40c8a0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
mov eax, 0x14144
call fcn.004148b0
push ebp
push esi
push edi
mov edi, dword [sym.imp.MSVCR71.dll_fopen]
mov esi, ecx
lea eax, [esi + 0xc]
push 0x4190c4
push eax
call edi
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x40c8d7
pop edi
pop esi
xor al, al
pop ebp
add esp, 0x14144
ret 8
mov eax, dword [esp + 0x14154]
push ebx
push 0x4190b0
push eax
call edi
mov ebx, eax
add esp, 8
test ebx, ebx
mov dword [esp + 0x10], ebx
jne 0x40c90d
push ebp
call dword [sym.imp.MSVCR71.dll_fclose]
add esp, 4
pop ebx
pop edi
pop esi
xor al, al
pop ebp
add esp, 0x14144
ret 8
mov byte [esp + 0x50], 0
xor eax, eax
mov ecx, 0x40
lea edi, [esp + 0x51]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push str.Rav.tst
lea ecx, [esp + 0x54]
stosb byte es:[edi], al
mov edi, dword [0x417080]
push ecx
call edi
lea eax, [esi + 0x138]
push 0x5c
push eax
call dword [sym.imp.MSVCR71.dll_strrchr]
mov cl, byte [eax]
add esp, 8
test cl, cl
je 0x40c957
inc eax
je 0x40c957
push eax
lea edx, [esp + 0x54]
push edx
call edi
mov eax, dword [esp + 0x1415c]
test eax, eax
jne 0x40c966
lea eax, [esp + 0x50]
lea ecx, [eax + 1]
lea esp, [esp]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40c970
sub eax, ecx
mov ecx, dword [esi + 0x2c0]
push 0
lea edx, [ecx + eax + 0x1e]
push edx
push ebp
call dword [sym.imp.MSVCR71.dll_fseek]
push 0x38
push 0x4190b4
xor eax, eax
push eax
push 8
push 0xfffffffffffffff1
mov ecx, 0xe
lea edi, [esp + 0x38]
rep stosd dword es:[edi], eax
push 8
lea eax, [esp + 0x3c]
push 0xffffffffffffffff
push eax
mov dword [esp + 0x40], 0
mov dword [esp + 0x68], 0x40c3c0
mov dword [esp + 0x64], 0x40c3a0
call fcn.0040dc00
mov al, byte [ebx + 0xc]
mov ebx, dword [sym.imp.MSVCR71.dll_fwrite]
add esp, 0x2c
test al, 0x10
jne 0x40caba
mov ecx, dword [esp + 0x10]
push ecx
push 0xa000
lea edx, [esp + 0xa15c]
push 1
push edx
call dword [sym.imp.MSVCR71.dll_fread]
mov edi, eax
add esp, 0x10
test edi, edi
je 0x40caba
mov ecx, dword [esp + 0x14]
push edi
lea eax, [esp + 0xa158]
push eax
push ecx
call fcn.0040f2a0
mov dword [esp + 0x20], eax
add esp, 0xc
test edi, edi
lea edx, [esp + 0xa154]
lea eax, [esp + 0x154]
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], edi
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], 0xa000
jbe 0x40ca8e
mov eax, dword [esp + 0x28]
test eax, eax
jne 0x40ca77
push ebp
push 1
lea ecx, [esp + 0x15c]
push 0xa000
push ecx
call ebx
lea edx, [esp + 0x164]
add esp, 0x10
mov dword [esp + 0x28], 0xa000
mov dword [esp + 0x24], edx
lea eax, [esp + 0x18]
push 0
push eax
call fcn.0040e050
mov eax, dword [esp + 0x24]
add esp, 8
test eax, eax
ja 0x40ca47
mov ecx, dword [esp + 0x28]
mov eax, 0xa000
sub eax, ecx
je 0x40caac
push ebp
push 1
push eax
lea ecx, [esp + 0x160]
push ecx
call ebx
add esp, 0x10
mov edx, dword [esp + 0x10]
test byte [edx + 0xc], 0x10
je 0x40c9e0
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.MSVCR71.dll_fclose]
lea ecx, [esp + 0x158]
mov edi, 0xa000
add esp, 4
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], edi
lea esp, [esp]
mov eax, dword [esp + 0x28]
test eax, eax
jne 0x40cb08
push ebp
push 1
lea edx, [esp + 0x15c]
push edi
push edx
call ebx
lea eax, [esp + 0x164]
add esp, 0x10
mov dword [esp + 0x28], edi
mov dword [esp + 0x24], eax
lea ecx, [esp + 0x18]
push 4
push ecx
call fcn.0040e050
add esp, 8
test eax, eax
je 0x40cae0
mov ecx, dword [esp + 0x28]
mov eax, edi
sub eax, ecx
je 0x40cb36
push ebp
push 1
push eax
lea edx, [esp + 0x160]
push edx
call ebx
add esp, 0x10
push ebp
call dword [sym.imp.MSVCR71.dll_ftell]
mov dword [esp + 0x14], eax
mov edx, dword [esp + 0x18]
xor eax, eax
lea edi, [esi + 0x264]
mov ecx, edi
mov dword [ecx], eax
mov dword [ecx + 4], eax
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], eax
mov dword [ecx + 0x10], eax
mov dword [ecx + 0x14], eax
mov dword [ecx + 0x18], eax
mov word [ecx + 0x1c], ax
mov ecx, dword [esp + 0x30]
mov word [esi + 0x26a], ax
mov eax, dword [esp + 0x24]
mov dword [esi + 0x27a], eax
mov eax, dword [esp + 0x14160]
add esp, 4
test eax, eax
mov dword [esi + 0x272], edx
mov dword [edi], 0x4034b50
mov dword [esi + 0x276], ecx
je 0x40cba9
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40cba0
jmp 0x40cbb7
lea eax, [esp + 0x50]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40cbb0
sub eax, edx
mov edx, dword [esi + 0x2c0]
push 0
push edx
push ebp
mov word [esi + 0x27e], ax
mov word [esi + 0x26c], 8
mov word [esi + 0x268], 0x14
call dword [sym.imp.MSVCR71.dll_fseek]
push ebp
push 1
push 0x1e
push edi
call ebx
mov edi, dword [esp + 0x14178]
add esp, 0x1c
test edi, edi
je 0x40cc10
mov eax, edi
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40cc00
push ebp
push 1
sub eax, edx
push eax
push edi
jmp 0x40cc2b
lea eax, [esp + 0x50]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40cc17
push ebp
sub eax, edx
push 1
push eax
lea eax, [esi + 0x138]
push eax
call ebx
mov eax, dword [esp + 0x20]
add esp, 0x10
push 0
push eax
push ebp
call dword [sym.imp.MSVCR71.dll_fseek]
mov ecx, dword [esi + 0x2bc]
mov edx, dword [esi + 0x2d4]
push ebp
push 1
push ecx
push edx
call ebx
mov eax, dword [esi + 0x2d4]
push eax
call sub.MSVCR71.dll_free
xor eax, eax
lea edx, [esi + 0x282]
mov dword [esi + 0x2d4], 0
mov ecx, 0xb
mov edi, edx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov cx, word [esi + 0x26c]
mov eax, 0x14
mov word [esi + 0x286], ax
mov word [esi + 0x288], ax
mov eax, dword [esi + 0x272]
mov dword [esi + 0x292], eax
mov eax, dword [esi + 0x27a]
mov dword [esi + 0x29a], eax
mov eax, dword [esp + 0x1417c]
mov word [esi + 0x28c], cx
mov ecx, dword [esi + 0x276]
add esp, 0x20
test eax, eax
mov dword [edx], 0x2014b50
mov dword [esi + 0x296], ecx
je 0x40ccdf
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40ccd6
jmp 0x40cced
lea eax, [esp + 0x50]
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40cce6
mov ecx, dword [esi + 0x2c0]
push ebp
push 1
sub eax, edi
push 0x2e
push edx
mov word [esi + 0x29e], ax
mov dword [esi + 0x2ac], ecx
call ebx
mov edi, dword [esp + 0x1416c]
add esp, 0x10
test edi, edi
je 0x40cd30
mov eax, edi
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40cd20
push ebp
push 1
sub eax, edx
push eax
push edi
jmp 0x40cd49
lea eax, [esp + 0x50]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40cd37
push ebp
sub eax, edx
push 1
push eax
lea edx, [esp + 0x5c]
push edx
call ebx
mov ecx, dword [esi + 0x2bc]
mov eax, dword [esp + 0x20]
add esp, 0x10
inc word [esi + 0x2b8]
inc word [esi + 0x2ba]
add ecx, 0x2e
test edi, edi
mov dword [esi + 0x2c0], eax
mov dword [esi + 0x2bc], ecx
mov edx, ecx
je 0x40cd89
mov eax, edi
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40cd80
jmp 0x40cd97
lea eax, [esp + 0x50]
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40cd90
push ebp
push 1
sub eax, edi
lea ecx, [esi + 0x2b0]
add edx, eax
push 0x16
push ecx
mov dword [esi + 0x2bc], edx
mov word [esi + 0x2c4], 0
call ebx
lea edx, [esp + 0x28]
push edx
call fcn.0040e3b0
push ebp
call dword [sym.imp.MSVCR71.dll_fclose]
add esp, 0x18
lea eax, [esi + 0xc]
push eax
mov ecx, esi
call fcn.0040c2d0
pop ebx
pop edi
pop esi
mov al, 1
pop ebp
add esp, 0x14144
ret 8