Function at 0x435710
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push eax
mov eax, 4
add esp, 0xfffff004
push eax
dec eax
jne 0x435719
mov eax, dword [ebp - 4]
add esp, 0xfffffdc8
push ebx
push esi
push edi
mov esi, dword [ebp + 0x18]
mov edi, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
cmp esi, 3
je 0x435751
cmp esi, 2
je 0x435751
cmp esi, 1
je 0x435751
mov eax, 0x10000
jmp 0x435a52
cmp esi, 3
jne 0x4357fb
mov eax, dword [ebx + 4]
cmp edi, eax
je 0x4357b3
inc eax
je 0x43576d
mov edx, dword [ebx]
push edx
call fcn.00434fb0
pop ecx
mov dword [ebx + 4], 0xffffffff
mov eax, dword [ebx]
mov edx, dword [eax + 4]
cmp edi, edx
jl 0x435787
mov eax, 0x10000
jmp 0x435a52
mov edx, dword [eax + 0x10]
cmp edi, edx
jge 0x43579e
push eax
call fcn.00434828
pop ecx
jmp 0x43579e
push eax
call fcn.00434874
pop ecx
mov eax, dword [ebx]
mov edx, dword [eax + 0x10]
cmp edi, edx
jg 0x435797
mov ecx, dword [ebx]
push ecx
call fcn.00434bc4
pop ecx
mov dword [ebx + 4], edi
mov eax, dword [ebp + 0x14]
push eax
mov edx, dword [ebp + 0x10]
push edx
mov ecx, dword [ebx]
push ecx
call fcn.00434d00
add esp, 0xc
mov esi, eax
test esi, esi
jle 0x4357d6
mov eax, 0x600
jmp 0x435a52
mov edx, dword [ebx]
push edx
call fcn.00434fb0
pop ecx
mov dword [ebx + 4], 0xffffffff
test esi, esi
jne 0x4357f1
xor eax, eax
jmp 0x435a52
mov eax, 0x5000000
jmp 0x435a52
mov edx, dword [ebx + 4]
inc edx
je 0x43580a
mov ecx, dword [ebx]
push ecx
call fcn.00434fb0
pop ecx
mov dword [ebx + 4], 0xffffffff
mov eax, dword [ebx]
mov edx, dword [eax + 4]
cmp edi, edx
jl 0x435824
mov eax, 0x10000
jmp 0x435a52
mov edx, dword [eax + 0x10]
cmp edi, edx
jge 0x43583b
push eax
call fcn.00434828
pop ecx
jmp 0x43583b
push eax
call fcn.00434874
pop ecx
mov eax, dword [ebx]
mov edx, dword [eax + 0x10]
cmp edi, edx
jg 0x435834
lea ecx, [ebp - 0x138]
push ecx
push edi
push ebx
call fcn.004351b0
add esp, 0xc
test byte [ebp - 0x30], 0x10
je 0x435884
cmp esi, 1
jne 0x435867
xor eax, eax
jmp 0x435a52
lea edx, [ebp - 0x134]
push edx
add ebx, 0x138
push ebx
call fcn.00435650
add esp, 8
xor eax, eax
jmp 0x435a52
cmp esi, 1
jne 0x435891
mov edi, dword [ebp + 0x10]
jmp 0x43599a
mov edi, dword [ebp + 0x10]
mov eax, edi
jmp 0x4358a9
movsx edx, byte [eax]
cmp edx, 0x2f
je 0x4358a5
cmp edx, 0x5c
jne 0x4358a8
lea edi, [eax + 1]
inc eax
mov dl, byte [eax]
test dl, dl
jne 0x435898
mov eax, dword [ebp + 0x10]
cmp edi, eax
je 0x43597e
mov ecx, dword [ebp + 0x10]
push esi
push edi
mov edi, ecx
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea esi, [ebp - 0x23c]
xchg edi, esi
mov edx, ecx
mov eax, edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
mov eax, dword [ebp + 0x10]
sub edi, eax
pop esi
mov byte [ebp + edi - 0x23d], 0
movsx eax, byte [ebp - 0x23c]
cmp eax, 0x2f
je 0x435914
cmp eax, 0x5c
je 0x435914
movsx edx, byte [ebp - 0x23b]
cmp edx, 0x3a
je 0x435914
xor ecx, ecx
jmp 0x435919
mov ecx, 1
mov byte [ebp - 1], cl
push 0x5d0bca
lea eax, [ebp - 0x23c]
push eax
call fcn.004ce0fd
add esp, 8
test eax, eax
setne dl
and edx, 1
lea eax, [ebp - 0x23c]
push 0x5d0bce
push eax
mov edi, edx
call fcn.004ce0fd
add esp, 8
test eax, eax
setne dl
and edx, 1
or edi, edx
setne cl
and ecx, 1
or byte [ebp - 1], cl
mov al, byte [ebp - 1]
test al, al
jne 0x43597e
lea edx, [ebp - 0x23c]
push edx
lea ecx, [ebx + 0x138]
push ecx
call fcn.00435650
add esp, 8
push 0
mov eax, dword [ebp - 0x30]
push eax
push 2
push 0
push 0
push 0x40000000
mov edx, dword [ebp + 0x10]
push edx
call sub.KERNEL32.dll_CreateFileA
mov edi, eax
cmp edi, 0xffffffff
jne 0x4359a9
mov eax, 0x200
jmp 0x435a52
mov edx, dword [ebx]
push edx
call fcn.00434bc4
pop ecx
mov byte [ebp - 2], 0
push 0x4000
lea ecx, [ebp - 0x423c]
push ecx
mov eax, dword [ebx]
push eax
call fcn.00434d00
add esp, 0xc
test eax, eax
jge 0x4359d7
mov byte [ebp - 2], 1
jmp 0x4359fb
test eax, eax
je 0x4359fb
push 0
lea edx, [ebp - 8]
push edx
push eax
lea ecx, [ebp - 0x423c]
push ecx
push edi
call sub.KERNEL32.dll_WriteFile
test eax, eax
jne 0x4359b6
mov byte [ebp - 2], 1
jmp 0x4359fb
mov byte [ebp - 9], 0
push edi
call sub.KERNEL32.dll_GetFileType
cmp eax, 1
jne 0x435a15
mov al, byte [ebp - 2]
test al, al
jne 0x435a15
mov byte [ebp - 9], 1
mov dl, byte [ebp - 9]
test dl, dl
je 0x435a2e
lea ecx, [ebp - 0x1c]
push ecx
lea eax, [ebp - 0x2c]
push eax
lea edx, [ebp - 0x24]
push edx
push edi
call sub.KERNEL32.dll_SetFileTime
cmp esi, 1
je 0x435a39
push edi
call sub.KERNEL32.dll_CloseHandle
mov ecx, dword [ebx]
push ecx
call fcn.00434fb0
pop ecx
mov al, byte [ebp - 2]
test al, al
je 0x435a50
mov eax, 0x400
jmp 0x435a52
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret