Function at 0x10023480
Capabilities:
Write file on windows

Disassembly:
mov eax, 0x433c
call fcn.10025b50
mov eax, dword [0x1004b580]
xor eax, esp
mov dword [esp + 0x4338], eax
push ebx
mov ebx, dword [esp + 0x4350]
cmp ebx, 3
push ebp
push esi
push edi
mov edi, dword [esp + 0x4354]
mov ebp, ecx
je 0x100234cd
cmp ebx, 2
je 0x1002357c
cmp ebx, 1
je 0x1002357c
mov eax, 0x10000
jmp 0x100237eb
mov eax, dword [ebp + 4]
mov esi, dword [esp + 0x4350]
cmp esi, eax
je 0x10023534
cmp eax, 0xffffffff
je 0x100234ec
mov eax, dword [ebp]
push eax
call fcn.10020dc0
add esp, 4
mov eax, dword [ebp]
mov dword [ebp + 4], 0xffffffff
cmp esi, dword [eax + 4]
jge 0x100234c3
cmp esi, dword [eax + 0x10]
jge 0x10023509
push eax
call fcn.10020900
add esp, 4
mov ecx, dword [ebp]
cmp dword [ecx + 0x10], esi
jge 0x10023525
mov edx, dword [ebp]
push edx
call fcn.10020950
mov eax, dword [ebp]
add esp, 4
cmp dword [eax + 0x10], esi
jl 0x10023511
mov ecx, dword [ebp]
push ecx
call fcn.10023110
add esp, 4
mov dword [ebp + 4], esi
mov edx, dword [esp + 0x4358]
mov eax, dword [ebp]
push edx
push edi
push eax
call fcn.10023230
mov esi, eax
add esp, 0xc
test esi, esi
jle 0x10023559
mov eax, 0x600
jmp 0x100237eb
mov ecx, dword [ebp]
push ecx
call fcn.10020dc0
add esp, 4
mov eax, esi
neg eax
sbb eax, eax
mov dword [ebp + 4], 0xffffffff
and eax, 0x5000000
jmp 0x100237eb
or esi, 0xffffffff
cmp dword [ebp + 4], esi
je 0x10023590
mov edx, dword [ebp]
push edx
call fcn.10020dc0
add esp, 4
mov eax, dword [ebp]
mov dword [ebp + 4], esi
mov esi, dword [esp + 0x4350]
cmp esi, dword [eax + 4]
jge 0x100234c3
cmp esi, dword [eax + 0x10]
jge 0x100235b4
push eax
call fcn.10020900
add esp, 4
mov eax, dword [ebp]
cmp dword [eax + 0x10], esi
jge 0x100235d4
lea esp, [esp]
mov ecx, dword [ebp]
push ecx
call fcn.10020950
mov edx, dword [ebp]
add esp, 4
cmp dword [edx + 0x10], esi
jl 0x100235c0
lea eax, [esp + 0x14]
push eax
push esi
mov ecx, ebp
call fcn.10020f50
test byte [esp + 0x11c], 0x10
je 0x1002361f
cmp ebx, 1
je 0x10023618
lea ecx, [esp + 0x18]
push ecx
mov esi, 0x103
lea edi, [esp + 0x144]
call fcn.1001ff00
mov edx, edi
push edx
add ebp, 0x138
push ebp
call fcn.100213c0
add esp, 0xc
xor eax, eax
jmp 0x100237eb
cmp ebx, 1
mov esi, edi
je 0x1002371e
movzx eax, word [edi]
test ax, ax
mov ecx, edi
je 0x10023700
movzx eax, ax
jmp 0x10023640
cmp ax, 0x2f
je 0x1002364c
cmp ax, 0x5c
jne 0x1002364f
lea esi, [ecx + 2]
movzx eax, word [ecx + 2]
add ecx, 2
test ax, ax
jne 0x10023640
cmp esi, edi
je 0x10023700
lea edx, [esp + 0x140]
mov eax, edi
sub edx, edi
mov edi, edi
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x10023670
sub esi, edi
sar esi, 1
mov word [esp + esi*2 + 0x13e], cx
mov ax, word [esp + 0x140]
cmp ax, 0x2f
je 0x100236ae
cmp ax, 0x5c
je 0x100236ae
cmp word [esp + 0x142], 0x3a
je 0x100236ae
xor bl, bl
jmp 0x100236b0
mov bl, 1
lea eax, [esp + 0x140]
push 0x100450f8
push eax
call fcn.10025b7b
lea ecx, [esp + 0x148]
push 0x100450f0
push ecx
mov esi, eax
call fcn.10025b7b
add esp, 0x10
test eax, eax
setne dl
test esi, esi
setne al
or dl, al
or dl, bl
jne 0x10023700
lea ecx, [esp + 0x140]
push ecx
lea edx, [ebp + 0x138]
push edx
call fcn.100213c0
add esp, 8
mov eax, dword [esp + 0x11c]
push 0
push eax
push 2
push 0
push 0
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x1002372d
mov eax, 0x200
jmp 0x100237eb
mov ecx, dword [ebp]
push ecx
call fcn.10023110
mov eax, dword [ebp]
push 0x4000
lea edx, [esp + 0x350]
push edx
push eax
xor bl, bl
call fcn.10023230
add esp, 0x10
test eax, eax
jl 0x10023791
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
je 0x10023793
push 0
lea ecx, [esp + 0x14]
push ecx
push eax
lea edx, [esp + 0x354]
push edx
push esi
call edi
test eax, eax
je 0x10023791
mov ecx, dword [ebp]
push 0x4000
lea eax, [esp + 0x34c]
push eax
push ecx
call fcn.10023230
add esp, 0xc
test eax, eax
jge 0x1002375b
mov bl, 1
push esi
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x100237c2
test bl, bl
jne 0x100237c2
lea edx, [esp + 0x130]
push edx
lea eax, [esp + 0x124]
push eax
lea ecx, [esp + 0x130]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [esp + 0x435c], 1
je 0x100237d3
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp]
push edx
call fcn.10020dc0
add esp, 4
neg bl
sbb ebx, ebx
and ebx, 0x400
mov eax, ebx
mov ecx, dword [esp + 0x4348]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.100245d5
add esp, 0x433c
ret 0x10