Function at 0x482e6c
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 0x4834fc
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 0x4834db
test ebx, ebx
je 0x483228
cmp esi, dword [edi + 0x4c]
jb 0x482f9b
cmp esi, dword [edi + 0x68]
ja 0x482f9b
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 0x482faf
cmp esi, dword [ebp - 0x20]
je 0x482faf
mov eax, dword [edi + 0x4c]
sub dword [ebp - 0x20], eax
je 0x482faf
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 0x482f3a
mov ecx, 0xffffffff
test edi, edi
jne 0x4833ae
jmp 0x4833bc
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 0x482f88
mov eax, dword [ebp - 0x34]
mov dword [edi + 0xd8], eax
mov dword [edi + 0xdc], edx
jmp 0x482faf
mov edx, eax
add dword [edi + 0xd8], edx
mov edx, dword [ebp - 0x30]
adc dword [edi + 0xdc], edx
jmp 0x482faf
xor edx, edx
mov dword [edi + 0xe8], edx
mov dword [edi + 0xec], edx
mov dword [edi + 0x110], edx
cmp dword [0x2e00b58], 0
je 0x48304a
cmp dword [ebp - 0x14], 0
je 0x482f28
test ecx, ecx
je 0x482fec
cmp dword [ebp - 0x14], 0xfffffffa
je 0x483012
mov edx, dword [ebp - 0x14]
lea edx, [edx - 1]
cmp edx, 1
jbe 0x482ff7
cmp dword [ebp - 0x10], 0
je 0x48304a
push edx
call fcn.004cf410
add esp, 4
jmp 0x48304a
mov edx, dword [ebp - 0x14]
lea edx, [edx - 1]
cmp edx, 1
ja 0x48304a
mov dword [ebp - 0x2c], ecx
call fcn.004cf430
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x18], eax
cmp dword [0x2e00b58], 0
je 0x483023
test ecx, ecx
je 0x483023
cmp dword [ebp - 0x10], 0
je 0x483023
push dword [ebp - 0x18]
call fcn.004cf410
add esp, 4
push 0
push dword [ebp - 0x18]
push ebx
push esi
call fcn.004cf410
mov ecx, eax
add esp, 0x10
cmp ecx, ebx
je 0x48303d
mov ecx, 0xffffffff
test edi, edi
jne 0x4833ae
jmp 0x4833bc
mov ecx, 1
test byte [edi + 0x1a9], 0x40
jne 0x483060
mov edx, dword [edi + 0x54]
mov dword [ebp - 0x2c], edx
jmp 0x4830a1
test byte [edi + 0x1a7], 1
jne 0x483058
mov eax, dword [edi + 0x4c]
mov edx, dword [edi + 0x54]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x2c], edx
cmp esi, eax
je 0x48307e
cmp esi, dword [ebp - 0x2c]
jne 0x4830b0
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 0x4831f8
cmp esi, dword [ebp - 0x2c]
jne 0x4830b0
mov esi, dword [edi + 0x4c]
mov edx, dword [ebp - 0x2c]
sub edx, esi
add ebx, edx
test byte [edi + 0x1a3], 4
je 0x4830c9
test byte [edi + 0x1a2], 0x40
je 0x4830c9
or byte [edi + 0x1a5], 8
mov edx, dword [edi + 0x168]
test edx, edx
je 0x4830db
cmp ebx, edx
jbe 0x483143
mov ecx, ebx
jmp 0x4830ea
cmp ebx, 0x20000
jbe 0x483143
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 0x48342d
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 0x4833d3
test edi, edi
je 0x4833c6
cmp eax, 1
jne 0x4833c6
mov edx, dword [ebp - 0x1c]
test edx, edx
ja 0x4830fb
jmp 0x483413
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
cmp eax, dword [ebp - 0x18]
je 0x48348f
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 0x48317a
cmp dword [ebp - 0x14], 1
je 0x483479
mov ecx, 0xffffffff
test edi, edi
je 0x4833ac
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 0x4831df
mov dword [edi + 0xd8], edx
test edi, edi
mov dword [edi + 0xdc], esi
jne 0x4833ae
jmp 0x4833bc
add dword [edi + 0xd8], ebx
adc dword [edi + 0xdc], eax
test edi, edi
jne 0x4833ae
jmp 0x4833bc
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 0x4833ae
jmp 0x4833bc
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 0x4832be
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 0x48327a
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 0x4831c6
jmp 0x4831df
mov eax, dword [edi + 0x94]
test eax, eax
je 0x4834c0
cmp byte [eax + 0x1e], 0
je 0x4833a5
movzx eax, word [edi + 0x18a]
test eax, eax
jg 0x4834c9
mov edx, dword [edi + 0x4c]
mov eax, dword [edi + 0x60]
sub eax, edx
mov dword [ebp - 0x34], eax
test eax, eax
jle 0x48331e
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 0x483323
mov ecx, 0xffffffff
jmp 0x483323
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.004ca8b0
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 0x483391
mov dword [edi + 0xd8], ebx
test edi, edi
mov dword [edi + 0xdc], esi
jne 0x4833ae
jmp 0x4833bc
mov ebx, eax
add dword [edi + 0xd8], ebx
adc dword [edi + 0xdc], edx
test edi, edi
jne 0x4833ae
jmp 0x4833bc
mov ecx, 1
test edi, edi
je 0x4833bc
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 0x483167
mov edx, dword [ebp - 0x1c]
add ebx, edx
sub edi, edx
cmp dword [ebp - 0x34], 0
je 0x483401
mov ecx, dword [ebp - 0x34]
mov ecx, dword [ecx + 0x168]
test ecx, ecx
je 0x483401
cmp edi, ecx
ja 0x4833f3
mov esi, edi
test edi, edi
je 0x483420
test edx, edx
ja 0x4830fb
jmp 0x483420
cmp edi, 0x20000
ja 0x48340b
mov esi, edi
test edi, edi
jne 0x48313a
mov ebx, dword [ebp - 0x28]
mov ecx, eax
mov edi, dword [ebp - 0x34]
jmp 0x48317a
mov ebx, dword [ebp - 0x28]
mov ecx, eax
mov edi, dword [ebp - 0x34]
jmp 0x483182
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 2
jne 0x48310c
push esi
push ebx
push 1
call fcn.004dd0a4
mov edx, eax
add esp, 0xc
cmp edx, 0xffffffff
je 0x48345f
mov dword [ebp - 0x1c], edx
mov eax, 1
jmp 0x4833d6
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 0x48311d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 6
jne 0x483175
xor ecx, ecx
jmp 0x48317a
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 2
jne 0x483154
push ebx
push esi
push 1
call fcn.004dd0a4
add esp, 0xc
cmp eax, 0xffffffff
je 0x483154
mov ecx, 1
jmp 0x48317a
movzx eax, word [edi + 0x18a]
test eax, eax
mov ecx, 1
test edi, edi
jne 0x4833ae
jmp 0x4833bc
xor edx, edx
mov dword [edi + 0xe8], edx
mov dword [edi + 0xec], edx
mov dword [edi + 0x110], edx
test ebx, ebx
je 0x48323c
jmp 0x482ee8
cmp dword [0x2e00b58], 0
jne 0x48353d
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebp - 0x18], eax
mov ecx, dword [0x2e00b58]
mov dword [ebp - 0x10], ecx
test ebx, ebx
je 0x4834c9
test ecx, ecx
jne 0x482ff7
mov dword [ebp - 0x14], 1
cmp ebx, 0x20000
jbe 0x483143
jmp 0x4830e3
call fcn.004cf430
jmp 0x48350d