Function at 0x4822a1
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x644
push ebx
mov ebx, dword [ebp + 0x14]
push esi
cmp ebx, 3
push edi
mov esi, ecx
je 0x4822d3
cmp ebx, 2
je 0x48237b
cmp ebx, 1
je 0x48237b
mov eax, 0x10000
jmp 0x4825f5
mov eax, dword [esi + 4]
mov edi, dword [ebp + 8]
cmp edi, eax
je 0x482322
cmp eax, 0xffffffff
je 0x4822ea
push dword [esi]
call fcn.00481b2c
pop ecx
mov eax, dword [esi]
or dword [esi + 4], 0xffffffff
cmp edi, dword [eax + 4]
jge 0x4822c9
cmp edi, dword [eax + 0x10]
jge 0x482301
push eax
call fcn.004814e6
pop ecx
mov eax, dword [esi]
cmp dword [eax + 0x10], edi
jge 0x482310
push eax
call fcn.00481524
jmp 0x482300
push dword [esi + 0x23c]
push dword [esi]
call fcn.004817b2
pop ecx
mov dword [esi + 4], edi
pop ecx
lea eax, [ebp + 0xb]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [esi]
call fcn.00481912
mov edi, eax
add esp, 0x10
test edi, edi
jg 0x482348
push dword [esi]
call fcn.00481b2c
or dword [esi + 4], 0xffffffff
pop ecx
cmp byte [ebp + 0xb], 0
je 0x482355
xor eax, eax
jmp 0x4825f5
test edi, edi
jle 0x482363
mov eax, 0x600
jmp 0x4825f5
xor eax, eax
cmp edi, 0xffffff96
setne al
dec eax
and eax, 0xfb001000
add eax, 0x5000000
jmp 0x4825f5
cmp dword [esi + 4], 0xffffffff
je 0x482389
push dword [esi]
call fcn.00481b2c
pop ecx
mov eax, dword [esi]
mov edi, dword [ebp + 8]
or dword [esi + 4], 0xffffffff
cmp edi, dword [eax + 4]
jge 0x4822c9
cmp edi, dword [eax + 0x10]
jge 0x4823a7
push eax
call fcn.004814e6
pop ecx
mov eax, dword [esi]
cmp dword [eax + 0x10], edi
jge 0x4823b6
push eax
call fcn.00481524
jmp 0x4823a6
lea eax, [ebp - 0x43c]
mov ecx, esi
push eax
push edi
call fcn.00481ccf
test byte [ebp - 0x230], 0x10
je 0x48240e
cmp ebx, 1
je 0x48234e
mov ecx, dword [ebp + 0xc]
mov ax, word [ecx]
cmp ax, 0x2f
je 0x4823f5
cmp ax, 0x5c
je 0x4823f5
test ax, ax
je 0x4823fa
cmp word [ecx + 2], 0x3a
jne 0x4823fa
push ecx
push 0
jmp 0x482402
add esi, 0x244
push ecx
push esi
call fcn.004821cb
pop ecx
pop ecx
jmp 0x48234e
cmp ebx, 1
jne 0x48241b
mov eax, dword [ebp + 0xc]
jmp 0x4824ab
mov edi, dword [ebp + 0xc]
mov ebx, edi
mov ecx, edi
mov ax, word [edi]
test ax, ax
je 0x482440
cmp ax, 0x2f
je 0x482436
cmp ax, 0x5c
jne 0x482439
lea ebx, [ecx + 2]
inc ecx
inc ecx
mov ax, word [ecx]
jmp 0x482425
lea eax, [ebp - 0x20c]
push edi
push eax
call fcn.004909ee
pop ecx
cmp ebx, edi
pop ecx
jne 0x4824bd
and word [ebp - 0x20c], 0
lea eax, [ebp - 0x20c]
lea edi, [esi + 0x244]
push ebx
push eax
push edi
lea eax, [ebp - 0x644]
push str._s_s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
lea eax, [ebp - 0x20c]
push eax
push edi
call fcn.004821cb
add esp, 0x1c
xor eax, eax
push eax
push dword [ebp - 0x230]
push 2
push eax
push eax
lea eax, [ebp - 0x644]
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp + 8], eax
jne 0x48252c
mov eax, 0x200
jmp 0x4825f5
mov eax, ebx
sub eax, edi
sar eax, 1
and word [ebp + eax*2 - 0x20c], 0
cmp word [ebp - 0x20c], 0x2f
je 0x4824fc
cmp word [ebp - 0x20c], 0x5c
je 0x4824fc
cmp word [ebp - 0x20c], 0
je 0x48245b
cmp word [ebp - 0x20a], 0x3a
jne 0x48245b
lea eax, [ebp - 0x20c]
push ebx
push eax
lea eax, [ebp - 0x644]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
lea eax, [ebp - 0x20c]
push eax
push 0
call fcn.004821cb
add esp, 0x18
jmp 0x48248c
push dword [esi + 0x23c]
push dword [esi]
call fcn.004817b2
cmp dword [esi + 0x240], 0
pop ecx
pop ecx
mov ebx, 0x4000
jne 0x482556
push ebx
call fcn.00490944
pop ecx
mov dword [esi + 0x240], eax
and dword [ebp + 0x10], 0
lea eax, [ebp + 0xf]
push eax
push ebx
push dword [esi + 0x240]
push dword [esi]
call fcn.00481912
mov edi, eax
add esp, 0x10
cmp edi, 0xffffff96
je 0x4825a2
test edi, edi
jl 0x4825ab
jle 0x482596
lea eax, [ebp - 4]
push 0
push eax
push edi
push dword [esi + 0x240]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4825b4
cmp byte [ebp + 0xf], 0
jne 0x4825bd
test edi, edi
je 0x4825ab
jmp 0x48255a
mov dword [ebp + 0x10], 0x1000
jmp 0x4825db
mov dword [ebp + 0x10], 0x5000000
jmp 0x4825db
mov dword [ebp + 0x10], 0x400
jmp 0x4825db
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x22c]
push eax
lea eax, [ebp - 0x224]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0x14], 1
je 0x4825ea
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esi]
call fcn.00481b2c
mov eax, dword [ebp + 0x10]
pop ecx
pop edi
pop esi
pop ebx
leave
ret 0x10