Function at 0x40ab80
Capabilities:
Check if file exists
Get file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x417678
mov eax, dword fs:[0]
push eax
mov eax, 0x1e14
call fcn.004169f0
mov eax, dword [0x427024]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov eax, dword [ebp + 8]
mov ecx, str.windows_hook_manager
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x1df0], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x1de8], eax
mov eax, esi
mov dword [ebp - 0x1dec], esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40abf6
test dl, dl
je 0x40abf2
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40abf6
add eax, 2
add ecx, 2
test dl, dl
jne 0x40abd6
xor eax, eax
jmp 0x40abfb
sbb eax, eax
or eax, 1
test eax, eax
je 0x40b104
mov ecx, str.windows_hook_helper
mov eax, esi
nop word [eax + eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40ac30
test dl, dl
je 0x40ac2c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40ac30
add eax, 2
add ecx, 2
test dl, dl
jne 0x40ac10
xor eax, eax
jmp 0x40ac35
sbb eax, eax
or eax, 1
test eax, eax
je 0x40b104
cmp dword [ebx + 0x14], 0
jbe 0x40b104
cmp dword [ebx + 0x18], 0x10
lea esi, [ebx + 4]
jb 0x40ac54
mov eax, dword [esi]
jmp 0x40ac56
mov eax, esi
mov edi, dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__stat64i32]
lea ecx, [ebp - 0x1de4]
push ecx
push eax
call edi
add esp, 8
test eax, eax
jne 0x40ae3e
cmp dword [ebp - 0x1dd0], 0xa00000
jle 0x40ae3e
push 0xffffffffffffffff
lea eax, [ebx + 0x1c]
mov dword [ebp - 0x1da0], 0xf
push 0
push eax
lea ecx, [ebp - 0x1db4]
mov dword [ebp - 0x1da4], 0
mov byte [ebp - 0x1db4], 0
call fcn.00405720
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x1da4]
test ecx, ecx
je 0x40aceb
cmp dword [ebp - 0x1da0], 0x10
lea eax, [ebp - 0x1db4]
cmovae eax, dword [ebp - 0x1db4]
cmp byte [eax + ecx - 1], 0x5c
je 0x40aceb
push 0x41a704
lea ecx, [ebp - 0x1db4]
call fcn.00404fa0
lea ecx, [ebp - 0x1e08]
call fcn.0040b130
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp - 0x1db4]
mov byte [ebp - 4], 1
call fcn.00405960
lea ecx, [ebp - 0x1e08]
mov byte [ebp - 4], 0
call fcn.00404fe0
cmp dword [ebp - 0x1da0], 0x10
lea eax, [ebp - 0x1db4]
cmovae eax, dword [ebp - 0x1db4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40ad3d
test al, 0x10
jne 0x40ad56
cmp dword [ebp - 0x1da0], 0x10
lea ecx, [ebp - 0x1db4]
cmovae ecx, dword [ebp - 0x1db4]
call fcn.0040d350
push 0x41a704
lea ecx, [ebp - 0x1db4]
call fcn.00404fa0
cmp dword [esi + 0x14], 0x10
jb 0x40ad70
mov eax, dword [esi]
jmp 0x40ad72
mov eax, esi
push 0x421b2c
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov edi, eax
add esp, 8
test edi, edi
je 0x40adec
lea ecx, [ebp - 0x1e08]
call fcn.0040ee60
cmp dword [eax + 0x14], 0x10
jb 0x40ad9a
mov eax, dword [eax]
push eax
push str._s__Continue_on_next_file_____n
lea eax, [ebp - 0x11e4]
push 0xbb8
push eax
call fcn.0040a740
add esp, 0x10
lea ecx, [ebp - 0x1e08]
call fcn.00404fe0
lea ecx, [ebp - 0x11e4]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40adc8
push edi
sub ecx, edx
lea eax, [ebp - 0x11e4]
push 1
push ecx
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 0x14
mov ecx, esi
call fcn.0040b1c0
lea eax, [ebx + 0x34]
push eax
lea edx, [ebp - 0x1db4]
lea ecx, [ebp - 0x1e20]
call fcn.0040b710
lea ecx, [ebx + 0x4c]
mov byte [ebp - 4], 2
push ecx
mov edx, eax
lea ecx, [ebp - 0x1e08]
call fcn.00406540
add esp, 8
mov ecx, esi
push eax
call fcn.00405020
lea ecx, [ebp - 0x1e08]
call fcn.00404fe0
lea ecx, [ebp - 0x1e20]
jmp 0x40af8b
cmp dword [esi + 0x14], 0x10
jb 0x40ae48
mov eax, dword [esi]
jmp 0x40ae4a
mov eax, esi
lea ecx, [ebp - 0x1de4]
push ecx
push eax
call edi
add esp, 8
test eax, eax
je 0x40afa2
cmp dword [ebx + 0x2c], 0
lea edi, [ebx + 0x1c]
jbe 0x40ae7d
cmp dword [edi + 0x14], 0x10
jb 0x40ae72
mov ecx, dword [edi]
jmp 0x40ae74
mov ecx, edi
call fcn.0040d330
test al, al
jne 0x40ae87
cmp dword [ebx + 0x2c], 0
jne 0x40afa2
push edi
lea ecx, [ebp - 0x1db4]
call fcn.00405180
mov dword [ebp - 4], 3
cmp dword [ebx + 0x2c], 0
jbe 0x40aed1
cmp dword [ebp - 0x1da0], 0x10
lea ecx, [ebp - 0x1db4]
mov eax, dword [ebp - 0x1da4]
cmovae ecx, dword [ebp - 0x1db4]
cmp byte [ecx + eax - 1], 0x5c
je 0x40aed1
push 0x41a704
lea ecx, [ebp - 0x1db4]
call fcn.00404fa0
lea ecx, [ebp - 0x1e20]
call fcn.0040b130
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp - 0x1db4]
mov byte [ebp - 4], 4
call fcn.00405960
lea ecx, [ebp - 0x1e20]
mov byte [ebp - 4], 3
call fcn.00404fe0
cmp dword [ebp - 0x1da0], 0x10
lea ecx, [ebp - 0x1db4]
cmovae ecx, dword [ebp - 0x1db4]
call fcn.0040d330
test al, al
jne 0x40af35
cmp dword [ebp - 0x1da0], 0x10
lea ecx, [ebp - 0x1db4]
cmovae ecx, dword [ebp - 0x1db4]
call fcn.0040d350
push 0x41a704
lea ecx, [ebp - 0x1db4]
call fcn.00404fa0
lea eax, [ebx + 0x34]
push eax
lea edx, [ebp - 0x1db4]
lea ecx, [ebp - 0x1e08]
call fcn.0040b710
lea ecx, [ebx + 0x4c]
mov byte [ebp - 4], 5
push ecx
mov edx, eax
lea ecx, [ebp - 0x1e20]
call fcn.00406540
add esp, 8
mov ecx, esi
push eax
call fcn.00405020
lea ecx, [ebp - 0x1e20]
call fcn.00404fe0
lea ecx, [ebp - 0x1e08]
call fcn.00404fe0
lea ecx, [ebp - 0x1db4]
mov dword [ebp - 4], 0xffffffff
call fcn.00404fe0
cmp dword [esi + 0x14], 0x10
jb 0x40afaa
mov esi, dword [esi]
push 0x421b2c
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov edi, eax
add esp, 8
test edi, edi
je 0x40b104
push 0x104
lea eax, [ebp - 0x62c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push pe_nt_image_headers32
lea eax, [ebp - 0x420]
push eax
push 0x104
lea eax, [ebp - 0x21c]
push eax
push 0
push 0
push 0
lea eax, [ebp - 0x62c]
push 0
push eax
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wsplitpath_s]
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x21c]
push 0x105
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
add esp, 0x30
lea eax, [ebp - 0x21c]
lea ecx, [ebp - 0x1e08]
push eax
call fcn.00404f00
lea edx, [ebp - 0x1e08]
mov dword [ebp - 4], 6
lea ecx, [ebp - 0x1dcc]
call fcn.0040c0f0
mov ebx, eax
lea ecx, [ebp - 0x1e20]
mov byte [ebp - 4], 7
call fcn.0040ee60
cmp dword [ebx + 0x14], 0x10
mov esi, eax
jb 0x40b065
mov ebx, dword [ebx]
cmp dword [esi + 0x14], 0x10
jb 0x40b06d
mov esi, dword [esi]
push dword [ebp - 0x1de8]
cmp dword [ebp - 0x1df0], 1
mov ecx, str.ERROR
push dword [ebp - 0x1dec]
mov eax, str.DEBUG
cmovle eax, ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push ebx
push esi
push str._s__s___d____s____s_:__s_n
lea eax, [ebp - 0x1d9c]
push 0xbb8
push eax
call fcn.0040a740
add esp, 0x24
lea ecx, [ebp - 0x1e20]
call fcn.00404fe0
lea ecx, [ebp - 0x1dcc]
call fcn.00404fe0
lea ecx, [ebp - 0x1e08]
call fcn.00404ec0
lea ecx, [ebp - 0x1d9c]
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40b0e0
push edi
sub ecx, edx
lea eax, [ebp - 0x1d9c]
push 1
push ecx
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 0x14
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00415b3b
mov esp, ebp
pop ebp
ret 0xc