Function at 0x40ef20
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4bef13
mov eax, dword fs:[0]
push eax
sub esp, 0x114
mov eax, dword [0x4ea688]
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 edi, ecx
lea eax, [edi + 4]
push eax
mov dword [ebp - 0x110], edi
mov dword [ebp - 0x114], eax
mov dword [ebp - 0x120], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor ebx, ebx
mov dword [ebp - 4], ebx
mov eax, dword [edi + 0x180]
mov ecx, dword [eax + 4]
lea esi, [edi + 0x168]
push ecx
mov ecx, esi
call fcn.00415f00
mov eax, dword [esi + 0x18]
mov dword [eax + 4], eax
mov eax, dword [esi + 0x18]
mov dword [esi + 0x1c], ebx
mov dword [eax], eax
mov esi, dword [esi + 0x18]
lea edx, [ebp - 0xf0]
mov dword [esi + 8], esi
push edx
mov dword [edi + 0x1c], ebx
call fcn.0040f580
mov byte [ebp - 4], 1
mov ecx, dword [edi + 0x20]
lea edi, [ebp - 0xf0]
call fcn.0040f6a0
mov dword [ebp - 0x104], ebx
call fcn.0040fd40
mov ebx, eax
test ebx, ebx
je 0x40f100
mov eax, dword [ebx + 0x14]
mov edi, dword [ebx]
mov eax, dword [eax]
mov dword [ebp - 0x108], eax
mov dword [ebp - 0x100], edi
mov esi, eax
test edi, edi
jne 0x40f0a0
call fcn.00493a81
xor ecx, ecx
mov eax, esi
cmp eax, dword [ecx + 0x14]
jne 0x40f008
call fcn.00493a81
mov eax, dword [ebp - 0x108]
mov eax, dword [eax + 8]
mov dword [ebp - 0x108], eax
mov ecx, dword [ebx + 0x14]
mov eax, dword [ebx]
mov dword [ebp - 0x118], ecx
test edi, edi
je 0x40f024
cmp edi, eax
je 0x40f029
call fcn.00493a81
cmp esi, dword [ebp - 0x118]
je 0x40f0b5
test edi, edi
jne 0x40f0a7
call fcn.00493a81
cmp esi, dword [edi + 0x14]
jne 0x40f048
call fcn.00493a81
mov eax, dword [ebp - 0x108]
sub eax, dword [esi + 8]
mov ecx, dword [ebp - 0x110]
mov edi, dword [ecx + 0x190]
push 0
cdq
push 0x15180
push edx
push eax
call fcn.004a86d0
xor ecx, ecx
cmp edx, ecx
jg 0x40f0af
jl 0x40f078
cmp eax, edi
jae 0x40f0af
mov eax, dword [ebp - 0x100]
test eax, eax
jne 0x40f0ab
call fcn.00493a81
xor eax, eax
cmp esi, dword [eax + 0x14]
jne 0x40f093
call fcn.00493a81
mov esi, dword [esi]
mov edi, dword [ebp - 0x100]
jmp 0x40f011
mov ecx, dword [edi]
jmp 0x40eff8
mov edi, dword [edi]
jmp 0x40f03e
mov eax, dword [eax]
jmp 0x40f089
mov edi, dword [ebp - 0x100]
mov edx, dword [ebx + 0x14]
mov eax, dword [ebx]
mov dword [ebp - 0x118], edx
test edi, edi
je 0x40f0c8
cmp edi, eax
je 0x40f0cd
call fcn.00493a81
cmp esi, dword [ebp - 0x118]
je 0x40f0f6
mov eax, dword [ebx + 0x14]
mov ecx, dword [ebx]
push eax
push ecx
push esi
push edi
lea eax, [ebp - 0x11c]
push eax
mov eax, ebx
call fcn.00412300
mov dword [ebp - 0x104], 1
lea ecx, [ebp - 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [ebp - 0x110]
mov eax, dword [esi + 0x20]
cmp dword [eax - 0xc], 0
jne 0x40f133
lea edx, [ebp - 0xf0]
push edx
mov byte [ebp - 4], 0
call fcn.0040dc70
mov eax, dword [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor al, al
jmp 0x40f2d9
xor edi, edi
mov dword [ebp - 0x108], edi
mov byte [ebp - 4], 2
cmp dword [ebp - 0x104], edi
je 0x40f2ba
cmp dword [ebx + 0x18], edi
jbe 0x40f2ba
push edi
push 0x80
push 4
push edi
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x40f298
call fcn.00423a20
test eax, eax
jne 0x40f2ba
xor eax, eax
push eax
lea ecx, [ebp - 0xfc]
push ecx
push eax
push edi
mov dword [ebp - 0x100], eax
mov dword [ebp - 0xfc], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x40f1b3
call fcn.00423a20
test eax, eax
jge 0x40f1b3
jne 0x40f2af
push 0
lea edx, [ebp - 0x104]
push edx
push 0x64
add esi, 0x24
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40f1da
call fcn.00423a20
test eax, eax
jne 0x40f2af
push 0
push 0x64
lea esi, [ebp - 0x108]
call fcn.00423790
test eax, eax
jne 0x40f2af
test edi, edi
je 0x40f206
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x108], 0
mov eax, dword [ebx + 0x14]
mov eax, dword [eax]
mov esi, dword [ebx]
mov byte [ebp - 0xf1], 1
mov dword [ebp - 0x100], esi
mov dword [ebp - 0xfc], eax
mov edi, dword [ebx + 0x14]
mov eax, dword [ebx]
test esi, esi
je 0x40f22d
cmp esi, eax
je 0x40f232
call fcn.00493a81
cmp dword [ebp - 0xfc], edi
je 0x40f2a9
mov dword [ebp - 0x104], 0xffffffff
test esi, esi
jne 0x40f2a5
call fcn.00493a81
mov eax, dword [ebp - 0xfc]
cmp eax, dword [esi + 0x14]
jne 0x40f25d
call fcn.00493a81
mov ecx, dword [ebp - 0xfc]
mov edx, dword [ebp - 0x110]
add ecx, 8
push ecx
push edx
lea edx, [ebp - 0xf1]
lea ecx, [ebp - 0x104]
call fcn.0040eb80
lea edi, [ebp - 0x11c]
lea esi, [ebp - 0x100]
call fcn.00414bc0
mov esi, dword [ebp - 0x100]
jmp 0x40f220
mov dword [ebp - 0x108], eax
mov edi, eax
jmp 0x40f181
mov esi, dword [esi]
jmp 0x40f24d
mov edi, dword [ebp - 0x108]
test edi, edi
je 0x40f2ba
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0xf0]
push eax
mov byte [ebp - 4], 0
call fcn.0040dc70
mov ecx, dword [ebp - 0x114]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov al, 1
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.00491db1
mov esp, ebp
pop ebp
ret