Function at 0x420742
Capabilities:
Write file on windows

Disassembly:
push 0x14
mov eax, 0x443cfa
call fcn.00429d10
mov eax, dword [ebp + 0x14]
mov esi, dword [ebp + 8]
mov ecx, dword [eax]
xor ebx, ebx
cmp dword [ebp + 0xc], ebx
jne 0x42079f
cmp ecx, ebx
je 0x420958
mov edi, dword [ebp + 0x1c]
cmp dword [ebp + 0xc], ebx
je 0x4207f1
mov edx, dword [ebp + 0x18]
mov eax, dword [edi]
mov edx, dword [edx]
sub edx, eax
cmp edx, dword [ebp + 0x10]
jb 0x4207f1
push dword [ebp + 0x10]
add eax, ecx
push dword [ebp + 0xc]
push eax
call fcn.00429e20
mov eax, dword [ebp + 0x10]
add dword [edi], eax
add esp, 0xc
and dword [ebp - 0x1c], ebx
mov edi, eax
jmp 0x420910
cmp ecx, ebx
je 0x420765
mov eax, dword [esi + 0x30]
mov edx, dword [eax + 8]
mov edi, dword [ebp + 0x18]
lea eax, [edx + 1]
neg eax
sbb eax, eax
and eax, edx
cmp eax, dword [edi]
jae 0x420765
push dword [ebp + 0x1c]
push edi
push dword [ebp + 0x14]
push ebx
push ebx
push esi
call fcn.00420742
add esp, 0x18
test eax, eax
jne 0x4207d6
xor eax, eax
jmp 0x42095b
push dword [ebp + 0x1c]
push edi
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push esi
call fcn.00420742
add esp, 0x18
jmp 0x42095b
mov eax, dword [esi + 0x30]
lea ecx, [eax + 0x150]
test ecx, ecx
je 0x420809
lea ebx, [eax + 0x154]
mov dword [ebp - 0x1c], ebx
jmp 0x42080f
and dword [ebp - 0x1c], ebx
mov ebx, dword [ebp - 0x1c]
mov dword [ebp - 0x14], ebx
test ebx, ebx
je 0x42081d
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0x30]
and dword [ebp - 4], 0
push 0
push dword [esi + 0x4c]
push dword [esi + 0x48]
push dword [eax + 0x16c]
call fcn.0041c9ed
add esp, 0x10
test al, al
jne 0x42084b
test ebx, ebx
je 0x4207cf
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x4207cf
mov eax, dword [edi]
and dword [ebp - 0x18], 0
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x10], 1
test eax, eax
je 0x42088b
push 0
lea ecx, [ebp - 0x18]
push ecx
push eax
mov eax, dword [ebp + 0x14]
push dword [eax]
mov eax, dword [esi + 0x30]
push dword [eax + 0x16c]
call ebx
test eax, eax
je 0x4208bd
mov eax, dword [edi]
cmp eax, dword [ebp - 0x18]
jne 0x4208bd
mov dword [ebp - 0x10], 1
cmp dword [ebp + 0x10], 0
je 0x4208c1
push 0
lea eax, [ebp - 0x18]
push eax
push dword [ebp + 0x10]
mov eax, dword [esi + 0x30]
push dword [ebp + 0xc]
push dword [eax + 0x16c]
call ebx
test eax, eax
je 0x4208bd
mov eax, dword [ebp + 0x10]
cmp eax, dword [ebp - 0x18]
jne 0x4208bd
mov dword [ebp - 0x10], 1
jmp 0x4208c1
and dword [ebp - 0x10], 0
cmp dword [ebp - 0x1c], 0
je 0x4208d4
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
and dword [ebp - 0x14], 0
cmp dword [ebp - 0x10], 0
jne 0x4208ec
cmp dword [ebp - 0x14], 0
je 0x4207cf
push dword [ebp - 0x14]
jmp 0x420843
mov eax, dword [edi]
mov ecx, dword [ebp + 0x10]
lea ebx, [eax + ecx]
xor ecx, ecx
neg eax
adc ecx, ecx
neg ecx
cmp dword [ebp - 0x14], 0
mov edi, eax
mov dword [ebp - 0x1c], ecx
je 0x420910
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esi + 0x30]
lea ecx, [eax + 0x1c]
test ecx, ecx
je 0x42091f
add eax, 0x20
jmp 0x420921
xor eax, eax
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0x30]
add dword [eax + 0xc], edi
test ebx, ebx
je 0x420940
xor eax, eax
add dword [esi + 0x10], ebx
adc dword [esi + 0x14], eax
add dword [esi + 0x48], ebx
adc dword [esi + 0x4c], eax
mov esi, dword [esi + 0x30]
lea eax, [esi + 0x1c]
test eax, eax
je 0x42094f
lea eax, [esi + 0x20]
jmp 0x420951
xor eax, eax
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
inc eax
call fcn.00429de8
ret