Function at 0x43564c
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov dword [ebp - 4], edi
mov edi, eax
mov dword [ebp - 8], ebx
mov ebx, ecx
mov dword [ebp - 0xc], esi
mov esi, edx
test edi, edi
je 0x435c78
mov ecx, dword [edi + 0xec]
movzx edx, byte [edi + 0x180]
and edx, 0x80
mov dword [ebp - 0x18], ecx
movzx ecx, byte [edi + 0x181]
shr edx, 7
and ecx, 1
mov dword [ebp - 0x10], edx
xor edx, edx
mov dword [ebp - 0x14], ecx
mov ecx, dword [edi + 0x14c]
mov dword [edi + 0xd0], edx
mov dword [edi + 0xd4], edx
mov dword [edi + 0xf8], edx
test ebx, ebx
jne 0x43581e
test edi, edi
je 0x435c1b
test byte [edi + 0x17d], 4
jne 0x435773
mov eax, dword [edi + 0x7c]
test eax, eax
je 0x435b66
cmp byte [eax + 0x1e], 0
jne 0x4356e4
mov esi, 1
jmp 0x435981
mov ebx, dword [edi + 0x4c]
lea edx, [ebp - 0x1c]
push 0
sub ebx, dword [edi + 0x48]
push edx
push ebx
push dword [edi + 0x48]
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, eax
test esi, esi
mov eax, dword [edi + 0x38]
jne 0x43570b
mov esi, 0xffffffff
mov ecx, dword [edi + 0x100]
push ecx
push 0x20
push eax
and byte [edi + 0x17d], 0xfb
lea edx, [eax + ecx]
mov dword [edi + 0x40], 0
mov dword [edi + 0x44], edx
mov dword [edi + 0x3c], eax
mov dword [edi + 0x4c], eax
call fcn.004cda30
add esp, 0xc
mov eax, ebx
mov ecx, dword [edi + 0xc8]
add ebx, ecx
cdq
adc edx, dword [edi + 0xcc]
mov dword [edi + 0xc8], ebx
mov dword [edi + 0xc0], ebx
xor ebx, ebx
mov dword [edi + 0xcc], edx
mov dword [edi + 0xc4], edx
mov dword [edi + 0xb0], ebx
mov dword [edi + 0xb4], ebx
jmp 0x435b57
mov ebx, dword [edi + 0x40]
lea edx, [ebp - 0x1c]
push 0
sub ebx, dword [edi + 0x38]
push edx
push ebx
push dword [edi + 0x38]
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, eax
mov edx, dword [edi + 0x38]
mov eax, ebx
mov ecx, dword [edi + 0x100]
test esi, esi
mov dword [edi + 0x3c], edx
jne 0x4357a5
mov esi, 0xffffffff
add ecx, edx
cdq
mov eax, edx
mov edx, dword [edi + 0xc8]
add edx, ebx
mov dword [edi + 0x44], ecx
mov ecx, dword [edi + 0xcc]
adc ecx, eax
and byte [edi + 0x17d], 0xfb
mov dword [edi + 0x40], 0
mov dword [edi + 0xc8], edx
mov dword [edi + 0xcc], ecx
test byte [edi + 0x181], 0x20
je 0x4357ff
mov dword [edi + 0xc0], edx
xor edx, edx
mov dword [edi + 0xc4], ecx
mov dword [edi + 0xb0], edx
mov dword [edi + 0xb4], edx
jmp 0x435b57
xor edx, edx
add dword [edi + 0xc0], ebx
mov dword [edi + 0xb0], edx
adc dword [edi + 0xc4], eax
mov dword [edi + 0xb4], edx
jmp 0x435b57
test edi, edi
je 0x4358de
mov edx, dword [edi + 0x40]
test edx, edx
mov dword [ebp - 0x20], edx
je 0x4358de
cmp esi, dword [ebp - 0x20]
je 0x4358de
mov eax, dword [edi + 0x38]
sub dword [ebp - 0x20], eax
je 0x4358de
push 0
lea edx, [ebp - 0x1c]
push edx
push dword [ebp - 0x20]
push eax
push dword [ebp - 0x18]
mov dword [ebp - 0x28], ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0x28]
test eax, eax
jne 0x43587e
xor eax, eax
mov esi, 0xffffffff
mov dword [edi + 0xb0], eax
mov dword [edi + 0xb4], eax
jmp 0x435b57
mov eax, dword [ebp - 0x20]
cdq
mov dword [ebp - 0x2c], esi
mov esi, dword [edi + 0xc8]
add esi, eax
mov dword [ebp - 0x24], ebx
mov ebx, edx
mov edx, dword [edi + 0xcc]
adc edx, ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x34], esi
mov dword [edi + 0xc8], esi
mov dword [edi + 0xcc], edx
mov ebx, dword [ebp - 0x24]
mov esi, dword [ebp - 0x2c]
test byte [edi + 0x181], 0x20
je 0x4358cc
mov eax, dword [ebp - 0x34]
mov dword [edi + 0xc0], eax
mov dword [edi + 0xc4], edx
jmp 0x4358de
mov edx, dword [ebp - 0x20]
add dword [edi + 0xc0], edx
mov edx, dword [ebp - 0x30]
adc dword [edi + 0xc4], edx
cmp dword [0x518340], 0
je 0x435994
test ecx, ecx
jne 0x4358f9
mov esi, 0xffffffff
jmp 0x435979
cmp dword [ebp - 0x10], 0
je 0x435908
cmp ecx, 0xfffffffa
je 0x435b7b
cmp ecx, 2
je 0x435912
cmp ecx, 1
jne 0x435932
mov dword [ebp - 0x28], ecx
call fcn.004d2990
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x34], eax
cmp dword [0x518340], 0
je 0x43595f
mov dword [ebp - 0x30], 1
jmp 0x43593c
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x34], edx
cmp dword [ebp - 0x10], 0
je 0x435959
cmp dword [ebp - 0x14], 0
je 0x435959
push dword [ebp - 0x34]
mov dword [ebp - 0x28], ecx
call fcn.004d2700
mov ecx, dword [ebp - 0x28]
add esp, 4
cmp dword [ebp - 0x30], 0
je 0x435994
push 0
push dword [ebp - 0x34]
push ebx
push esi
call fcn.004d2760
mov esi, eax
add esp, 0x10
cmp esi, ebx
je 0x435979
mov esi, 0xffffffff
test edi, edi
je 0x435b57
xor edx, edx
mov dword [edi + 0xb0], edx
mov dword [edi + 0xb4], edx
jmp 0x435b57
test edi, edi
je 0x435a08
test byte [edi + 0x181], 0x40
jne 0x4359a9
mov edx, dword [edi + 0x40]
mov dword [ebp - 0x30], edx
jmp 0x4359ef
test byte [edi + 0x17f], 1
je 0x4359ba
mov edx, dword [edi + 0x40]
mov dword [ebp - 0x30], edx
jmp 0x4359ef
mov eax, dword [edi + 0x38]
cmp esi, eax
mov edx, dword [edi + 0x40]
mov dword [ebp - 0x30], edx
je 0x4359cc
cmp esi, dword [ebp - 0x30]
jne 0x4359fe
mov dword [ebp - 0x24], ebx
mov ebx, dword [edi + 0x100]
mov edx, dword [edi + 0x3c]
add eax, dword [edi + 0xf4]
mov dword [ebp - 0x34], ebx
lea edx, [edx + ebx*2]
mov ebx, dword [ebp - 0x24]
cmp eax, edx
ja 0x435b23
cmp esi, dword [ebp - 0x30]
jne 0x4359fe
mov esi, dword [edi + 0x38]
mov edx, dword [ebp - 0x30]
sub edx, esi
add ebx, edx
mov edx, dword [edi + 0x148]
test edx, edx
jne 0x435a0d
mov edx, 0x20000
cmp ebx, edx
jbe 0x435a75
mov edx, ebx
test edi, edi
je 0x435a21
mov eax, dword [edi + 0x148]
test eax, eax
jne 0x435a26
mov eax, 0x20000
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x24], ebx
mov ebx, eax
mov dword [ebp - 0x28], ecx
mov esi, dword [ebp - 0x30]
mov edi, dword [ebp - 0x18]
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
cmp edi, eax
je 0x435bd6
push 0
lea edx, [ebp - 0x1c]
push edx
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, 1
je 0x435b8d
mov ebx, dword [ebp - 0x24]
mov esi, eax
mov ecx, dword [ebp - 0x28]
mov edi, dword [ebp - 0x20]
jmp 0x435aa5
mov dword [ebp - 0x28], ecx
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ecx, dword [ebp - 0x28]
cmp eax, dword [ebp - 0x18]
je 0x435c3b
push 0
lea edx, [ebp - 0x1c]
push edx
push ebx
push esi
push dword [ebp - 0x18]
mov dword [ebp - 0x28], ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0x28]
mov esi, eax
test esi, esi
jne 0x435ab7
cmp ecx, 1
je 0x435c25
mov esi, 0xffffffff
test edi, edi
je 0x435b57
mov eax, ebx
cdq
mov ecx, dword [edi + 0x38]
mov eax, edx
mov edx, dword [edi + 0xc8]
add ecx, dword [edi + 0x100]
add edx, ebx
mov dword [edi + 0x44], ecx
mov ecx, dword [edi + 0xcc]
adc ecx, eax
and byte [edi + 0x17d], 0xfb
mov dword [edi + 0x40], 0
mov dword [edi + 0xc8], edx
mov dword [edi + 0xcc], ecx
test byte [edi + 0x181], 0x20
je 0x4357ff
mov dword [edi + 0xc0], edx
xor edx, edx
mov dword [edi + 0xc4], ecx
mov dword [edi + 0xb0], edx
mov dword [edi + 0xb4], edx
jmp 0x435b57
mov eax, ebx
add esi, ebx
cdq
add dword [edi + 0xc0], ebx
mov ecx, dword [ebp - 0x34]
mov dword [edi + 0x40], esi
adc dword [edi + 0xc4], edx
xor ebx, ebx
mov esi, 1
or byte [edi + 0x17d], 4
add dword [edi + 0x44], ecx
mov dword [edi + 0xb0], ebx
mov dword [edi + 0xb4], ebx
mov eax, esi
mov ebx, dword [ebp - 8]
mov esi, dword [ebp - 0xc]
mov edi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
xor eax, eax
mov esi, 1
mov dword [edi + 0xb0], eax
mov dword [edi + 0xb4], eax
jmp 0x435b57
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x30], 1
jmp 0x435942
mov edx, dword [ebp - 0x1c]
sub dword [ebp - 0x34], edx
add esi, edx
cmp dword [ebp - 0x20], 0
je 0x435ba8
mov ecx, dword [ebp - 0x20]
mov ecx, dword [ecx + 0x148]
test ecx, ecx
jne 0x435bad
mov ecx, 0x20000
cmp ecx, dword [ebp - 0x34]
jb 0x435bbb
mov ebx, dword [ebp - 0x34]
test ebx, ebx
jne 0x435bc1
jmp 0x435bc9
cmp dword [ebp - 0x34], 0
je 0x435bc9
test edx, edx
ja 0x435a40
mov ebx, dword [ebp - 0x24]
mov esi, eax
mov edi, dword [ebp - 0x20]
jmp 0x435ab7
push edi
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 2
jne 0x435a50
push ebx
push esi
push 1
call fcn.00484310
mov edx, eax
add esp, 0xc
cmp edx, 0xffffffff
je 0x435c03
mov dword [ebp - 0x1c], edx
mov eax, 1
jmp 0x435b90
push 0
lea edx, [ebp - 0x1c]
push edx
push dword [ebp - 0x24]
push dword [ebp - 0x2c]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x435a5f
mov esi, 1
jmp 0x435b57
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 6
jne 0x435ab2
xor esi, esi
jmp 0x435ab7
push dword [ebp - 0x18]
mov dword [ebp - 0x28], ecx
call dword [sym.imp.KERNEL32.dll_GetFileType]
mov ecx, dword [ebp - 0x28]
cmp eax, 2
jne 0x435a8c
push ebx
push esi
push 1
mov dword [ebp - 0x28], ecx
call fcn.00484310
mov ecx, dword [ebp - 0x28]
add esp, 0xc
cmp eax, 0xffffffff
je 0x435a8c
mov esi, 1
jmp 0x435ab7
cmp dword [0x518340], 0
jne 0x435ca2
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebp - 0x18], eax
mov edx, dword [0x518340]
mov ecx, 1
mov dword [ebp - 0x10], edx
mov dword [ebp - 0x14], edx
jmp 0x4356ac
call fcn.004d2990
jmp 0x435c89