Function at 0x62125c
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
push ebx
sub esp, 0x28
mov edi, eax
mov ebx, ecx
mov esi, edx
test edi, edi
je 0x6218ec
mov ecx, dword [edi + 0x104]
mov dword [ebp - 0x18], ecx
movzx ecx, byte [edi + 0x1a8]
movzx edx, byte [edi + 0x1a9]
and ecx, 0x80
and edx, 1
mov dword [ebp - 0x10], edx
mov edx, dword [edi + 0x16c]
shr ecx, 7
mov dword [ebp - 0x14], edx
test esi, esi
je 0x6218cb
test ebx, ebx
je 0x621618
cmp esi, dword [edi + 0x4c]
jb 0x62138b
cmp esi, dword [edi + 0x68]
ja 0x62138b
xor edx, edx
mov dword [edi + 0xe8], edx
mov dword [edi + 0xec], edx
mov dword [edi + 0x110], edx
mov edx, dword [edi + 0x54]
mov dword [ebp - 0x20], edx
test edx, edx
je 0x62139f
cmp esi, dword [ebp - 0x20]
je 0x62139f
mov eax, dword [edi + 0x4c]
sub dword [ebp - 0x20], eax
je 0x62139f
push 0
lea edx, [ebp - 0x1c]
push edx
push dword [ebp - 0x20]
push eax
push dword [ebp - 0x18]
mov dword [ebp - 0x2c], ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0x2c]
test eax, eax
jne 0x62132a
mov ecx, 0xffffffff
test edi, edi
jne 0x62179e
jmp 0x6217ac
mov eax, dword [ebp - 0x20]
cdq
mov dword [ebp - 0x24], esi
mov esi, dword [edi + 0xe0]
add esi, eax
mov dword [ebp - 0x28], ebx
mov ebx, edx
mov edx, dword [edi + 0xe4]
adc edx, ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x34], esi
mov dword [edi + 0xe0], esi
mov dword [edi + 0xe4], edx
mov ebx, dword [ebp - 0x28]
mov esi, dword [ebp - 0x24]
test byte [edi + 0x1ac], 4
je 0x621378
mov eax, dword [ebp - 0x34]
mov dword [edi + 0xd8], eax
mov dword [edi + 0xdc], edx
jmp 0x62139f
mov edx, eax
add dword [edi + 0xd8], edx
mov edx, dword [ebp - 0x30]
adc dword [edi + 0xdc], edx
jmp 0x62139f
xor edx, edx
mov dword [edi + 0xe8], edx
mov dword [edi + 0xec], edx
mov dword [edi + 0x110], edx
cmp dword [0x80ec60], 0
je 0x62143a
cmp dword [ebp - 0x14], 0
je 0x621318
test ecx, ecx
je 0x6213dc
cmp dword [ebp - 0x14], 0xfffffffa
je 0x621402
mov edx, dword [ebp - 0x14]
lea edx, [edx - 1]
cmp edx, 1
jbe 0x6213e7
cmp dword [ebp - 0x10], 0
je 0x62143a
push edx
call fcn.00692300
add esp, 4
jmp 0x62143a
mov edx, dword [ebp - 0x14]
lea edx, [edx - 1]
cmp edx, 1
ja 0x62143a
mov dword [ebp - 0x2c], ecx
call fcn.00692590
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x18], eax
cmp dword [0x80ec60], 0
je 0x621413
test ecx, ecx
je 0x621413
cmp dword [ebp - 0x10], 0
je 0x621413
push dword [ebp - 0x18]
call fcn.00692300
add esp, 4
push 0
push dword [ebp - 0x18]
push ebx
push esi
call fcn.00692360
mov ecx, eax
add esp, 0x10
cmp ecx, ebx
je 0x62142d
mov ecx, 0xffffffff
test edi, edi
jne 0x62179e
jmp 0x6217ac
mov ecx, 1
test byte [edi + 0x1a9], 0x40
jne 0x621450
mov edx, dword [edi + 0x54]
mov dword [ebp - 0x2c], edx
jmp 0x621491
test byte [edi + 0x1a7], 1
jne 0x621448
mov eax, dword [edi + 0x4c]
mov edx, dword [edi + 0x54]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x2c], edx
cmp esi, eax
je 0x62146e
cmp esi, dword [ebp - 0x2c]
jne 0x6214a0
mov dword [ebp - 0x30], ecx
mov eax, dword [edi + 0x118]
mov ecx, dword [edi + 0x50]
mov edx, dword [ebp - 0x34]
add edx, dword [edi + 0x10c]
lea ecx, [ecx + eax*2]
cmp edx, ecx
mov ecx, dword [ebp - 0x30]
ja 0x6215e8
cmp esi, dword [ebp - 0x2c]
jne 0x6214a0
mov esi, dword [edi + 0x4c]
mov edx, dword [ebp - 0x2c]
sub edx, esi
add ebx, edx
test byte [edi + 0x1a3], 4
je 0x6214b9
test byte [edi + 0x1a2], 0x40
je 0x6214b9
or byte [edi + 0x1a5], 8
mov edx, dword [edi + 0x168]
test edx, edx
je 0x6214cb
cmp ebx, edx
jbe 0x621533
mov ecx, ebx
jmp 0x6214da
cmp ebx, 0x20000
jbe 0x621533
mov ecx, ebx
mov edx, 0x20000
mov eax, esi
mov dword [ebp - 0x28], ebx
mov ebx, eax
mov dword [ebp - 0x24], esi
mov esi, edx
mov dword [ebp - 0x34], edi
mov edi, ecx
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
cmp eax, dword [ebp - 0x18]
je 0x62181d
push 0
lea eax, [ebp - 0x1c]
push eax
push esi
push ebx
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, 1
je 0x6217c3
test edi, edi
je 0x6217b6
cmp eax, 1
jne 0x6217b6
mov edx, dword [ebp - 0x1c]
test edx, edx
ja 0x6214eb
jmp 0x621803
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
cmp eax, dword [ebp - 0x18]
je 0x62187f
push 0
lea edx, [ebp - 0x1c]
push edx
push ebx
push esi
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, eax
test ecx, ecx
jne 0x62156a
cmp dword [ebp - 0x14], 1
je 0x621869
mov ecx, 0xffffffff
test edi, edi
je 0x62179c
mov eax, ebx
cdq
mov esi, dword [edi + 0x4c]
mov eax, edx
mov edx, dword [edi + 0xe0]
add esi, dword [edi + 0x118]
add edx, ebx
mov dword [edi + 0x58], esi
mov esi, dword [edi + 0xe4]
adc esi, eax
and byte [edi + 0x1a5], 0xfb
mov dword [edi + 0x54], 0
mov dword [edi + 0xe0], edx
mov dword [edi + 0xe4], esi
test byte [edi + 0x1ac], 4
je 0x6215cf
mov dword [edi + 0xd8], edx
test edi, edi
mov dword [edi + 0xdc], esi
jne 0x62179e
jmp 0x6217ac
add dword [edi + 0xd8], ebx
adc dword [edi + 0xdc], eax
test edi, edi
jne 0x62179e
jmp 0x6217ac
mov edx, eax
mov eax, ebx
add dword [edi + 0x58], edx
add esi, ebx
cdq
add dword [edi + 0xd8], ebx
mov dword [edi + 0x54], esi
adc dword [edi + 0xdc], edx
or byte [edi + 0x1a5], 4
mov dword [edi + 0x50], esi
test edi, edi
jne 0x62179e
jmp 0x6217ac
xor eax, eax
mov dword [edi + 0xe8], eax
mov dword [edi + 0xec], eax
mov dword [edi + 0x110], eax
movzx ebx, byte [edi + 0x1a5]
test bl, 4
je 0x6216ae
push 0
mov ebx, dword [edi + 0x54]
lea eax, [ebp - 0x1c]
sub ebx, dword [edi + 0x4c]
push eax
push ebx
push dword [edi + 0x4c]
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, eax
mov edx, dword [edi + 0x4c]
mov eax, ebx
mov esi, dword [edi + 0x118]
test ecx, ecx
mov dword [edi + 0x50], edx
jne 0x62166a
mov ecx, 0xffffffff
add esi, edx
cdq
mov eax, edx
mov edx, dword [edi + 0xe0]
add edx, ebx
mov dword [edi + 0x58], esi
mov esi, dword [edi + 0xe4]
adc esi, eax
and byte [edi + 0x1a5], 0xfb
mov dword [edi + 0x54], 0
mov dword [edi + 0xe0], edx
mov dword [edi + 0xe4], esi
test byte [edi + 0x1ac], 4
jne 0x6215b6
jmp 0x6215cf
mov eax, dword [edi + 0x94]
test eax, eax
je 0x6218b0
cmp byte [eax + 0x1e], 0
je 0x621795
movzx eax, word [edi + 0x18a]
test eax, eax
jg 0x6218b9
mov edx, dword [edi + 0x4c]
mov eax, dword [edi + 0x60]
sub eax, edx
mov dword [ebp - 0x34], eax
test eax, eax
jle 0x62170e
push 0
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x34]
push edx
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, eax
test ecx, ecx
mov edx, dword [edi + 0x4c]
movzx ebx, byte [edi + 0x1a5]
jne 0x621713
mov ecx, 0xffffffff
jmp 0x621713
mov ecx, 1
and ebx, 0xfffffffb
mov byte [edi + 0x1a5], bl
mov ebx, dword [edi + 0x118]
push ebx
push 0x20
push edx
add ebx, edx
mov dword [edi + 0x54], 0
mov dword [edi + 0x58], ebx
mov dword [edi + 0x50], edx
mov dword [edi + 0x60], edx
mov dword [ebp - 0x30], ecx
call fcn.0065d380
mov ecx, dword [ebp - 0x30]
add esp, 0xc
mov eax, dword [ebp - 0x34]
mov ebx, dword [edi + 0xe0]
cdq
add ebx, eax
mov esi, dword [edi + 0xe4]
adc esi, edx
mov dword [edi + 0xe0], ebx
mov dword [edi + 0xe4], esi
test byte [edi + 0x1ac], 4
je 0x621781
mov dword [edi + 0xd8], ebx
test edi, edi
mov dword [edi + 0xdc], esi
jne 0x62179e
jmp 0x6217ac
mov ebx, eax
add dword [edi + 0xd8], ebx
adc dword [edi + 0xdc], edx
test edi, edi
jne 0x62179e
jmp 0x6217ac
mov ecx, 1
test edi, edi
je 0x6217ac
xor edx, edx
mov dword [edi + 0xc8], edx
mov dword [edi + 0xcc], edx
mov eax, ecx
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
mov ebx, dword [ebp - 0x28]
mov ecx, eax
mov edi, dword [ebp - 0x34]
jmp 0x621557
mov edx, dword [ebp - 0x1c]
add ebx, edx
sub edi, edx
cmp dword [ebp - 0x34], 0
je 0x6217f1
mov ecx, dword [ebp - 0x34]
mov ecx, dword [ecx + 0x168]
test ecx, ecx
je 0x6217f1
cmp edi, ecx
ja 0x6217e3
mov esi, edi
test edi, edi
je 0x621810
test edx, edx
ja 0x6214eb
jmp 0x621810
cmp edi, 0x20000
ja 0x6217fb
mov esi, edi
test edi, edi
jne 0x62152a
mov ebx, dword [ebp - 0x28]
mov ecx, eax
mov edi, dword [ebp - 0x34]
jmp 0x62156a
mov ebx, dword [ebp - 0x28]
mov ecx, eax
mov edi, dword [ebp - 0x34]
jmp 0x621572
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 2
jne 0x6214fc
push esi
push ebx
push 1
call fcn.006d64a5
mov edx, eax
add esp, 0xc
cmp edx, 0xffffffff
je 0x62184f
mov dword [ebp - 0x1c], edx
mov eax, 1
jmp 0x6217c6
push 0
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x28]
push dword [ebp - 0x24]
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x62150d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 6
jne 0x621565
xor ecx, ecx
jmp 0x62156a
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 2
jne 0x621544
push ebx
push esi
push 1
call fcn.006d64a5
add esp, 0xc
cmp eax, 0xffffffff
je 0x621544
mov ecx, 1
jmp 0x62156a
movzx eax, word [edi + 0x18a]
test eax, eax
mov ecx, 1
test edi, edi
jne 0x62179e
jmp 0x6217ac
xor edx, edx
mov dword [edi + 0xe8], edx
mov dword [edi + 0xec], edx
mov dword [edi + 0x110], edx
test ebx, ebx
je 0x62162c
jmp 0x6212d8
cmp dword [0x80ec60], 0
jne 0x62192d
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebp - 0x18], eax
mov ecx, dword [0x80ec60]
mov dword [ebp - 0x10], ecx
test ebx, ebx
je 0x6218b9
test ecx, ecx
jne 0x6213e7
mov dword [ebp - 0x14], 1
cmp ebx, 0x20000
jbe 0x621533
jmp 0x6214d3
call fcn.00692590
jmp 0x6218fd