Function at 0x5e463c
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 0x5e4ccc
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 0x5e4cab
test ebx, ebx
je 0x5e49f8
cmp esi, dword [edi + 0x4c]
jb 0x5e476b
cmp esi, dword [edi + 0x68]
ja 0x5e476b
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 0x5e477f
cmp esi, dword [ebp - 0x20]
je 0x5e477f
mov eax, dword [edi + 0x4c]
sub dword [ebp - 0x20], eax
je 0x5e477f
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 0x5e470a
mov ecx, 0xffffffff
test edi, edi
jne 0x5e4b7e
jmp 0x5e4b8c
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 0x5e4758
mov eax, dword [ebp - 0x34]
mov dword [edi + 0xd8], eax
mov dword [edi + 0xdc], edx
jmp 0x5e477f
mov edx, eax
add dword [edi + 0xd8], edx
mov edx, dword [ebp - 0x30]
adc dword [edi + 0xdc], edx
jmp 0x5e477f
xor edx, edx
mov dword [edi + 0xe8], edx
mov dword [edi + 0xec], edx
mov dword [edi + 0x110], edx
cmp dword [0x7253f4], 0
je 0x5e481a
cmp dword [ebp - 0x14], 0
je 0x5e46f8
test ecx, ecx
je 0x5e47bc
cmp dword [ebp - 0x14], 0xfffffffa
je 0x5e47e2
mov edx, dword [ebp - 0x14]
lea edx, [edx - 1]
cmp edx, 1
jbe 0x5e47c7
cmp dword [ebp - 0x10], 0
je 0x5e481a
push edx
call fcn.0062f340
add esp, 4
jmp 0x5e481a
mov edx, dword [ebp - 0x14]
lea edx, [edx - 1]
cmp edx, 1
ja 0x5e481a
mov dword [ebp - 0x2c], ecx
call fcn.0062f360
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x18], eax
cmp dword [0x7253f4], 0
je 0x5e47f3
test ecx, ecx
je 0x5e47f3
cmp dword [ebp - 0x10], 0
je 0x5e47f3
push dword [ebp - 0x18]
call fcn.0062f340
add esp, 4
push 0
push dword [ebp - 0x18]
push ebx
push esi
call fcn.0062f340
mov ecx, eax
add esp, 0x10
cmp ecx, ebx
je 0x5e480d
mov ecx, 0xffffffff
test edi, edi
jne 0x5e4b7e
jmp 0x5e4b8c
mov ecx, 1
test byte [edi + 0x1a9], 0x40
jne 0x5e4830
mov edx, dword [edi + 0x54]
mov dword [ebp - 0x2c], edx
jmp 0x5e4871
test byte [edi + 0x1a7], 1
jne 0x5e4828
mov eax, dword [edi + 0x4c]
mov edx, dword [edi + 0x54]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x2c], edx
cmp esi, eax
je 0x5e484e
cmp esi, dword [ebp - 0x2c]
jne 0x5e4880
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 0x5e49c8
cmp esi, dword [ebp - 0x2c]
jne 0x5e4880
mov esi, dword [edi + 0x4c]
mov edx, dword [ebp - 0x2c]
sub edx, esi
add ebx, edx
test byte [edi + 0x1a3], 4
je 0x5e4899
test byte [edi + 0x1a2], 0x40
je 0x5e4899
or byte [edi + 0x1a5], 8
mov edx, dword [edi + 0x168]
test edx, edx
je 0x5e48ab
cmp ebx, edx
jbe 0x5e4913
mov ecx, ebx
jmp 0x5e48ba
cmp ebx, 0x20000
jbe 0x5e4913
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 0x5e4bfd
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 0x5e4ba3
test edi, edi
je 0x5e4b96
cmp eax, 1
jne 0x5e4b96
mov edx, dword [ebp - 0x1c]
test edx, edx
ja 0x5e48cb
jmp 0x5e4be3
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
cmp eax, dword [ebp - 0x18]
je 0x5e4c5f
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 0x5e494a
cmp dword [ebp - 0x14], 1
je 0x5e4c49
mov ecx, 0xffffffff
test edi, edi
je 0x5e4b7c
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 0x5e49af
mov dword [edi + 0xd8], edx
test edi, edi
mov dword [edi + 0xdc], esi
jne 0x5e4b7e
jmp 0x5e4b8c
add dword [edi + 0xd8], ebx
adc dword [edi + 0xdc], eax
test edi, edi
jne 0x5e4b7e
jmp 0x5e4b8c
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 0x5e4b7e
jmp 0x5e4b8c
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 0x5e4a8e
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 0x5e4a4a
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 0x5e4996
jmp 0x5e49af
mov eax, dword [edi + 0x94]
test eax, eax
je 0x5e4c90
cmp byte [eax + 0x1e], 0
je 0x5e4b75
movzx eax, word [edi + 0x18a]
test eax, eax
jg 0x5e4c99
mov edx, dword [edi + 0x4c]
mov eax, dword [edi + 0x60]
sub eax, edx
mov dword [ebp - 0x34], eax
test eax, eax
jle 0x5e4aee
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 0x5e4af3
mov ecx, 0xffffffff
jmp 0x5e4af3
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.0062a5e0
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 0x5e4b61
mov dword [edi + 0xd8], ebx
test edi, edi
mov dword [edi + 0xdc], esi
jne 0x5e4b7e
jmp 0x5e4b8c
mov ebx, eax
add dword [edi + 0xd8], ebx
adc dword [edi + 0xdc], edx
test edi, edi
jne 0x5e4b7e
jmp 0x5e4b8c
mov ecx, 1
test edi, edi
je 0x5e4b8c
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 0x5e4937
mov edx, dword [ebp - 0x1c]
add ebx, edx
sub edi, edx
cmp dword [ebp - 0x34], 0
je 0x5e4bd1
mov ecx, dword [ebp - 0x34]
mov ecx, dword [ecx + 0x168]
test ecx, ecx
je 0x5e4bd1
cmp edi, ecx
ja 0x5e4bc3
mov esi, edi
test edi, edi
je 0x5e4bf0
test edx, edx
ja 0x5e48cb
jmp 0x5e4bf0
cmp edi, 0x20000
ja 0x5e4bdb
mov esi, edi
test edi, edi
jne 0x5e490a
mov ebx, dword [ebp - 0x28]
mov ecx, eax
mov edi, dword [ebp - 0x34]
jmp 0x5e494a
mov ebx, dword [ebp - 0x28]
mov ecx, eax
mov edi, dword [ebp - 0x34]
jmp 0x5e4952
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 2
jne 0x5e48dc
push esi
push ebx
push 1
call fcn.00658dd4
mov edx, eax
add esp, 0xc
cmp edx, 0xffffffff
je 0x5e4c2f
mov dword [ebp - 0x1c], edx
mov eax, 1
jmp 0x5e4ba6
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 0x5e48ed
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 6
jne 0x5e4945
xor ecx, ecx
jmp 0x5e494a
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 2
jne 0x5e4924
push ebx
push esi
push 1
call fcn.00658dd4
add esp, 0xc
cmp eax, 0xffffffff
je 0x5e4924
mov ecx, 1
jmp 0x5e494a
movzx eax, word [edi + 0x18a]
test eax, eax
mov ecx, 1
test edi, edi
jne 0x5e4b7e
jmp 0x5e4b8c
xor edx, edx
mov dword [edi + 0xe8], edx
mov dword [edi + 0xec], edx
mov dword [edi + 0x110], edx
test ebx, ebx
je 0x5e4a0c
jmp 0x5e46b8
cmp dword [0x7253f4], 0
jne 0x5e4d0d
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebp - 0x18], eax
mov ecx, dword [0x7253f4]
mov dword [ebp - 0x10], ecx
test ebx, ebx
je 0x5e4c99
test ecx, ecx
jne 0x5e47c7
mov dword [ebp - 0x14], 1
cmp ebx, 0x20000
jbe 0x5e4913
jmp 0x5e48b3
call fcn.0062f360
jmp 0x5e4cdd