Function at 0x402750
Capabilities:
Delete file
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x406688
mov eax, dword fs:[0]
push eax
sub esp, 0x50
push ebx
push esi
push edi
mov eax, dword [0x40a018]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor eax, eax
xor ebx, ebx
mov dword [0x40ff40], eax
mov dword [0x40ff44], eax
mov dword [0x40ff48], eax
mov dword [0x40ff4c], eax
mov dword [0x40ff50], eax
mov dword [0x40ff54], eax
mov dword [0x40ff58], eax
mov dword [0x40ff5c], eax
mov dword [0x40ff60], eax
mov dword [0x40ff64], eax
mov dword [0x40ff68], eax
mov dword [0x40ff6c], eax
lea edi, [ebx + 8]
mov eax, str.data.idx
mov esi, 0x40fe98
call fcn.00402040
cmp dword [0x40feac], 0x10
mov eax, dword [0x40fe98]
jae 0x4027da
mov eax, esi
push eax
lea eax, [ebp - 0x3c]
push eax
call fcn.00404930
add esp, 8
mov esi, eax
mov edi, dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
cmp esi, 0x40feb4
je 0x40285f
cmp dword [0x40fec8], 0x10
jb 0x40280b
mov eax, dword [0x40feb4]
push eax
call edi
add esp, 4
mov dword [0x40fec8], 0xf
mov dword [0x40fec4], ebx
mov byte [0x40feb4], 0
cmp dword [esi + 0x14], 0x10
jae 0x40283e
mov eax, dword [esi + 0x10]
inc eax
push eax
push esi
push 0x40feb4
call dword [sym.imp.MSVCR100.dll_memmove]
add esp, 0xc
jmp 0x402848
mov ecx, dword [esi]
mov dword [0x40feb4], ecx
mov dword [esi], ebx
mov edx, dword [esi + 0x10]
mov dword [0x40fec4], edx
mov eax, dword [esi + 0x14]
mov dword [0x40fec8], eax
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], ebx
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x28], 0x10
jb 0x402875
mov ecx, dword [ebp - 0x3c]
push ecx
call edi
add esp, 4
mov edx, dword [sym.imp.MSVCR100.dll__fmode]
push ebx
mov dword [ebp - 0x28], 0xf
mov dword [ebp - 0x2c], ebx
mov byte [ebp - 0x3c], 0
push str.data.idx
mov dword [edx], 0x8000
call dword [sym.imp.MSVCR100.dll__access]
add esp, 8
test eax, eax
jne 0x402b26
cmp dword [0x40feac], 0x10
mov eax, dword [0x40fe98]
jae 0x4028b9
mov eax, 0x40fe98
push 0x4074b8
push eax
call dword [sym.imp.MSVCR100.dll_fopen]
add esp, 8
mov dword [0x40fed0], eax
cmp eax, ebx
je 0x402b26
mov esi, dword [sym.imp.MSVCR100.dll_fread]
push eax
push 1
push 4
push 0x40fedc
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x18], ebx
call esi
mov eax, dword [0x40fed0]
push eax
push 1
push 1
push 0x40fefc
call esi
mov al, byte [0x40fefc]
xor al, 0x55
mov byte [0x40fefc], al
movzx eax, al
xor ecx, ecx
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004057c6
add esp, 0x24
cmp byte [0x40fefc], 0
mov dword [0x40ff00], eax
mov byte [ebp - 0xd], 0
jbe 0x402b15
jmp 0x402948
mov esi, dword [sym.imp.MSVCR100.dll_fread]
xor ebx, ebx
xor eax, eax
push 0x20
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], eax
call dword [sym.imp.MSVCR100.dll_void____cdecl_operator_new_unsigned_int_]
add esp, 4
cmp eax, ebx
je 0x402980
mov dword [eax + 0x14], 0xf
mov dword [eax + 0x10], ebx
mov byte [eax], 0
jmp 0x402982
xor eax, eax
movzx ebx, byte [ebp - 0xd]
mov ecx, dword [0x40ff00]
mov dword [ecx + ebx*4], eax
mov edx, dword [0x40fed0]
push edx
push 1
lea eax, [ebp - 0x18]
push 1
push eax
call esi
mov ecx, dword [0x40fed0]
movsx edx, word [ebp - 0x18]
push ecx
push 1
push edx
lea eax, [ebp - 0x5c]
push eax
call esi
mov ecx, dword [0x40fed0]
push ecx
push 1
lea edx, [ebp - 0x14]
push 4
push edx
call esi
mov eax, ebx
and eax, 0x3f
movzx ecx, word [eax*8 + 0x407750]
lea eax, [ebp - 0x5c]
add esp, 0x30
xor dword [ebp - 0x14], ecx
lea esi, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4029e0
mov edx, dword [0x40ff00]
sub eax, esi
mov esi, dword [edx + ebx*4]
mov edi, eax
lea eax, [ebp - 0x5c]
call fcn.00402040
push 0x3c
call dword [sym.imp.MSVCR100.dll_void____cdecl_operator_new_unsigned_int_]
mov esi, eax
xor eax, eax
add esp, 4
cmp esi, eax
je 0x402a5e
mov dword [esi + 0x14], 0xf
mov dword [esi + 0x10], eax
mov byte [esi], al
mov dword [esi + 0x1c], eax
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], eax
mov dword [esi + 0x30], eax
mov dword [esi + 0x34], eax
mov dword [esi + 0x38], eax
mov ecx, dword [esi + 0x20]
mov edi, dword [esi + 0x1c]
cmp edi, ecx
je 0x402a59
mov eax, ecx
sub eax, ecx
sar eax, 2
add eax, eax
add eax, eax
push eax
push ecx
push edi
mov dword [ebp - 0x1c], eax
call dword [sym.imp.MSVCR100.dll_memmove]
add edi, dword [ebp - 0x1c]
add esp, 0xc
mov dword [esi + 0x20], edi
xor eax, eax
mov dword [esi + 0x2c], eax
jmp 0x402a60
xor esi, esi
mov ecx, dword [0x40ff00]
mov edx, dword [ecx + ebx*4]
mov dword [edx + 0x1c], esi
cmp esi, eax
je 0x402b01
mov eax, dword [0x40ff00]
mov eax, dword [eax + ebx*4]
cmp dword [eax + 0x14], 0x10
jb 0x402a86
mov ebx, dword [eax]
jmp 0x402a88
mov ebx, eax
mov esi, dword [eax + 0x1c]
mov ecx, dword [ebp - 0x14]
mov edx, dword [0x40fed0]
mov eax, ebx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x20], edx
lea edi, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402aa0
sub eax, edi
mov edi, eax
mov eax, ebx
call fcn.00402040
mov eax, dword [sym.imp.MSVCR100.dll__fmode]
push 0
push 0x80
push 3
push 0
push 1
push 0xc0000000
push ebx
mov dword [eax], 0x8000
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esi + 0x34], eax
cmp eax, 0xffffffff
je 0x402b01
push 0
push 0
push 0
push 2
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x20]
push ecx
push edx
mov ecx, esi
mov dword [esi + 0x38], eax
call fcn.00405210
mov al, byte [ebp - 0xd]
inc al
mov byte [ebp - 0xd], al
cmp al, byte [0x40fefc]
jb 0x402940
mov eax, dword [0x40fedc]
mov dword [0x40ff38], eax
mov byte [0x40ff3c], 1
push str.patch.hpl
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret