Function at 0x5048d0
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x94
mov eax, dword [0x578bd4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x18]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x44], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x7c], ecx
mov ecx, dword [esi + 0x160]
push 0
push dword [eax]
mov dword [ebp - 0x8c], esi
lea edi, [ecx + 0x14]
mov dword [ebp - 0x84], eax
push edi
push esi
mov dword [ebp - 0x80], ecx
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x6c], 0
call fcn.00502600
add esp, 0x10
mov dword [ebp - 0x70], eax
test eax, eax
jne 0x50498b
mov ecx, dword [ebp - 0x84]
mov eax, dword [ebp - 0x80]
add eax, 0x50
push dword [ecx]
push eax
call fcn.005035f0
add esp, 8
test eax, eax
je 0x504a29
push 0x18
push eax
push edi
push esi
call fcn.00502600
add esp, 0x10
mov dword [ebp - 0x70], eax
test eax, eax
je 0x504a29
cmp byte [esi + 0xe8], 0
je 0x50498b
push eax
push esi
call fcn.00504340
add esp, 8
test eax, eax
je 0x504a29
mov eax, dword [ebp - 0x70]
push dword [esi + 0x184]
mov eax, dword [eax + 0xc]
push dword [esi + 0x178]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x44]
push ebx
push eax
mov eax, dword [eax + 0x24]
call eax
mov edx, dword [ebp - 0x50]
mov ecx, 0x7fffffff
mov dword [ebp - 0x74], ecx
add esp, 0x10
sub ecx, edx
mov dword [ebp - 0x4c], eax
cmp eax, ecx
jg 0x504a29
mov edi, dword [esi + 0x178]
lea ecx, [eax + edx]
cmp ecx, edi
jle 0x504a3f
cmp edx, 0x7fffffef
jg 0x504a29
mov eax, 0x7fffffef
sub eax, edx
cmp dword [ebp - 0x4c], eax
jg 0x504a29
lea eax, [ecx + 0x10]
mov dword [esi + 0x178], eax
cmp eax, 0xfffffff
ja 0x504a23
shl eax, 4
push eax
push dword [esi + 0x184]
mov eax, dword [esi + 0x10]
call eax
add esp, 8
test eax, eax
je 0x504a23
mov ecx, dword [ebp - 0x4c]
mov dword [esi + 0x184], eax
cmp ecx, edi
jle 0x504a44
push eax
push ecx
push ebx
mov ebx, dword [ebp - 0x44]
push ebx
mov eax, dword [ebx + 0x24]
call eax
add esp, 0x10
jmp 0x504a47
mov dword [esi + 0x178], edi
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004c9126
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 0x44]
jmp 0x504a4a
mov ebx, dword [ebp - 0x44]
mov eax, dword [ebp - 0x4c]
mov edx, dword [esi + 0x184]
xor ecx, ecx
mov dword [ebp - 0x54], edx
mov dword [ebp - 0x64], ecx
test eax, eax
jle 0x504c24
mov dword [ebp - 0x68], ecx
xor edx, edx
nop word [eax + eax]
mov eax, dword [esi + 0x184]
mov dword [ebp - 0x78], edx
mov dword [ebp - 0x88], edx
mov edi, dword [eax + ecx]
mov eax, dword [ebx + 0x1c]
push edi
push ebx
call eax
add eax, edi
push eax
push edi
push ebx
push esi
call fcn.00501c60
mov ebx, eax
add esp, 0x18
test ebx, ebx
je 0x504a29
mov eax, dword [ebx]
cmp byte [eax - 1], 0
jne 0x504c53
mov edi, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x54]
mov byte [eax - 1], 1
mov eax, dword [ebx]
mov dword [ecx + edi*4], eax
inc edi
mov eax, dword [esi + 0x184]
add eax, dword [ebp - 0x68]
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x58], eax
cmp byte [eax + 0xc], 0
jne 0x504b46
cmp byte [ebx + 8], 0
mov byte [ebp - 0x5c], 1
je 0x504b0b
mov edi, dword [ebp - 0x50]
xor ecx, ecx
test edi, edi
jle 0x504b08
mov eax, dword [ebp - 0x70]
mov edx, dword [eax + 0x14]
mov eax, edx
nop dword [eax]
cmp ebx, dword [eax]
je 0x504afe
inc ecx
add eax, 0xc
cmp ecx, edi
jl 0x504af0
jmp 0x504b08
lea eax, [ecx + ecx*2]
mov al, byte [edx + eax*4 + 4]
mov byte [ebp - 0x5c], al
mov edi, dword [ebp - 0x40]
push dword [ebp + 0x1c]
lea eax, [esi + 0x19c]
push eax
mov eax, dword [ebp - 0x58]
push dword [eax + 8]
push dword [eax + 4]
mov eax, dword [ebp - 0x44]
push dword [ebp - 0x5c]
push eax
push esi
call fcn.00504860
add esp, 0x1c
test eax, eax
jne 0x504a2e
mov eax, dword [ebp - 0x54]
lea ecx, [eax + edi*4]
mov eax, dword [esi + 0x1ac]
mov dword [ecx], eax
jmp 0x504b9f
push dword [eax + 8]
lea edi, [esi + 0x19c]
push dword [eax + 4]
mov eax, dword [ebp - 0x44]
push eax
push edi
call fcn.00503210
add esp, 0x10
test eax, eax
je 0x504c0f
mov eax, dword [edi + 0xc]
cmp eax, dword [edi + 8]
jne 0x504b80
push edi
call fcn.005037a0
add esp, 4
test al, al
je 0x504c0f
mov eax, dword [edi + 0xc]
mov ecx, dword [ebp - 0x40]
mov edx, dword [ebp - 0x54]
lea ecx, [edx + ecx*4]
mov byte [eax], 0
inc dword [edi + 0xc]
mov eax, dword [edi + 0x10]
mov dword [ecx], eax
test eax, eax
je 0x504a29
mov eax, dword [esi + 0x1a8]
mov dword [esi + 0x1ac], eax
mov eax, dword [ebx + 4]
test eax, eax
je 0x504be9
cmp byte [ebx + 9], 0
je 0x504bd8
push dword [ebp - 0x7c]
push dword [ecx]
push ebx
push eax
push esi
call fcn.004fdea0
add esp, 0x14
test eax, eax
jne 0x504a2e
mov edx, dword [ebp - 0x88]
jmp 0x504bef
mov eax, dword [ebx]
mov edx, dword [ebp - 0x78]
add edx, 2
inc dword [ebp - 0x6c]
mov byte [eax - 1], 2
jmp 0x504bef
mov edx, dword [ebp - 0x78]
add edx, 2
mov eax, dword [ebp - 0x64]
mov ecx, dword [ebp - 0x68]
inc eax
add ecx, 0x10
mov dword [ebp - 0x40], edx
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x68], ecx
cmp eax, dword [ebp - 0x4c]
jge 0x504c21
mov ebx, dword [ebp - 0x44]
jmp 0x504a70
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x54]
mov dword [ecx + eax*4], 0
jmp 0x504a29
mov edx, dword [ebp - 0x54]
mov eax, dword [ebp - 0x70]
mov ebx, dword [ebp - 0x40]
mov dword [esi + 0x17c], ebx
mov ecx, dword [eax + 8]
test ecx, ecx
je 0x504c90
mov ecx, dword [ecx]
cmp byte [ecx - 1], 0
je 0x504c90
xor eax, eax
test ebx, ebx
jle 0x504c9a
cmp dword [edx + eax*4], ecx
je 0x504c88
add eax, 2
cmp eax, ebx
jl 0x504c45
jmp 0x504c9a
mov eax, dword [ebp - 0x44]
cmp eax, dword [esi + 0x90]
jne 0x504c72
mov ecx, dword [ebp - 0x64]
mov eax, dword [esi + 0x184]
add ecx, ecx
mov eax, dword [eax + ecx*8]
mov dword [esi + 0x11c], eax
pop edi
pop esi
mov eax, 8
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004c9126
mov esp, ebp
pop ebp
ret
mov dword [esi + 0x180], eax
jmp 0x504c9a
mov dword [esi + 0x180], 0xffffffff
xor edi, edi
cmp dword [ebp - 0x50], edi
jle 0x504d02
xor eax, eax
mov dword [ebp - 0x5c], eax
mov ecx, dword [ebp - 0x70]
mov ecx, dword [ecx + 0x14]
add ecx, eax
mov eax, dword [ecx]
mov edx, dword [eax]
cmp byte [edx - 1], 0
jne 0x504cf3
mov ebx, dword [ecx + 8]
mov dword [ebp - 0x58], ebx
test ebx, ebx
je 0x504cf0
mov ebx, dword [eax + 4]
test ebx, ebx
je 0x504d99
cmp byte [eax + 9], 0
je 0x504d73
push dword [ebp - 0x7c]
push dword [ebp - 0x58]
push eax
push ebx
push esi
call fcn.004fdea0
add esp, 0x14
test eax, eax
jne 0x504a2e
mov ebx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x5c]
inc edi
add eax, 0xc
mov dword [ebp - 0x5c], eax
cmp edi, dword [ebp - 0x50]
jl 0x504ca6
mov eax, dword [ebp - 0x54]
xor ecx, ecx
mov edi, dword [ebp - 0x6c]
mov dword [ebp - 0x5c], ecx
mov dword [eax + ebx*4], 0
test edi, edi
je 0x505200
mov dl, byte [esi + 0x190]
mov eax, dword [esi + 0x18c]
mov dword [ebp - 0x4c], eax
mov byte [ebp - 0x45], dl
cmp dl, 0x20
jae 0x504a29
movzx ecx, dl
lea eax, [edi + edi]
mov ebx, 1
sar eax, cl
shl ebx, cl
mov dword [ebp - 0x44], ebx
test eax, eax
je 0x504e03
mov cl, dl
mov eax, edi
sar eax, cl
inc cl
test eax, eax
jne 0x504d53
mov byte [esi + 0x190], cl
cmp cl, 3
jae 0x504dbc
mov byte [esi + 0x190], 3
mov cl, 3
jmp 0x504dc1
mov ebx, dword [ebp - 0x40]
inc dword [ebp - 0x6c]
mov byte [edx - 1], 2
mov eax, dword [ecx]
mov edx, dword [ebp - 0x54]
mov eax, dword [eax]
mov dword [edx + ebx*4], eax
mov eax, dword [ecx + 8]
mov dword [edx + ebx*4 + 4], eax
add ebx, 2
mov dword [ebp - 0x40], ebx
jmp 0x504cf3
mov ebx, dword [ebp - 0x40]
mov byte [edx - 1], 1
mov eax, dword [ecx]
mov edx, dword [ebp - 0x54]
mov eax, dword [eax]
mov dword [edx + ebx*4], eax
mov eax, dword [ecx + 8]
mov dword [edx + ebx*4 + 4], eax
add ebx, 2
mov dword [ebp - 0x40], ebx
jmp 0x504cf3
cmp cl, 0x20
jae 0x504df8
mov ebx, 1
shl ebx, cl
mov dword [ebp - 0x44], ebx
cmp ebx, 0x15555555
ja 0x504df8
lea eax, [ebx + ebx*2]
shl eax, 2
lea edi, [esi + 0x188]
push eax
push dword [edi]
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x60], edi
call eax
add esp, 8
test eax, eax
je 0x504df5
mov dword [edi], eax
jmp 0x504e13
mov dl, byte [ebp - 0x45]
mov byte [esi + 0x190], dl
jmp 0x504a29
mov eax, dword [ebp - 0x4c]
lea edi, [esi + 0x188]
mov dword [ebp - 0x60], edi
test eax, eax
jne 0x504e44
or eax, 0xffffffff
mov edx, ebx
mov dword [ebp - 0x4c], eax
test ebx, ebx
je 0x504e44
lea ecx, [ebx + ebx*2]
shl ecx, 2
nop word [eax + eax]
mov eax, dword [edi]
lea ecx, [ecx - 0xc]
mov dword [ecx + eax], 0xffffffff
sub edx, 1
jne 0x504e30
mov eax, dword [ebp - 0x4c]
dec eax
cmp dword [ebp - 0x40], 0
mov dword [ebp - 0x4c], eax
mov dword [esi + 0x18c], eax
jle 0x505224
mov ecx, dword [ebp - 0x40]
xor eax, eax
nop dword [eax]
mov edx, dword [ebp - 0x54]
mov edi, dword [edx + eax*4]
lea edx, [edx + eax*4]
mov dword [ebp - 0x90], edx
cmp byte [edi - 1], 2
jne 0x5051e3
mov eax, dword [esi + 0x1d8]
test eax, eax
je 0x504e90
push eax
call fcn.00502240
add esp, 4
mov ebx, eax
jmp 0x504e96
mov ebx, dword [esi + 0x1ec]
xor edx, edx
mov dword [ebp - 0x3c], 0x70736575
mov eax, edx
mov dword [ebp - 0x38], 0x736f6d65
xor eax, 0x646f7261
mov dword [ebp - 0x2c], 0x6e657261
mov dword [ebp - 0x30], eax
mov ecx, ebx
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x28], 0x6c796765
mov dword [ebp - 0x14], eax
xor ecx, 0x6e646f6d
mov eax, dword [ebp - 0x80]
xor edx, 0x74656462
push 0
push edi
add eax, 0x28
mov dword [ebp - 0x34], ecx
push eax
xorps xmm0, xmm0
mov dword [ebp - 0x20], edx
xor ebx, 0x79746573
movlpd qword [ebp - 0xc], xmm0
push esi
mov dword [ebp - 0x24], ebx
mov byte [edi - 1], 0
call fcn.00502600
add esp, 0x10
test eax, eax
je 0x504a29
mov eax, dword [eax + 4]
test eax, eax
je 0x504a29
mov ecx, dword [eax + 4]
mov dword [ebp - 0x68], ecx
test ecx, ecx
je 0x50525e
mov eax, dword [ecx + 0x14]
xor ebx, ebx
test eax, eax
jle 0x504f9a
mov edx, dword [ebp - 0x60]
nop dword [eax]
mov eax, dword [ebp - 0x44]
mov ecx, edx
mov edx, dword [ebp - 0x68]
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x58], ecx
mov eax, dword [edx + 0x10]
mov al, byte [ebx + eax]
mov byte [ebp - 0x45], al
mov eax, dword [esi + 0x1a8]
cmp eax, dword [esi + 0x1a4]
jne 0x504f6f
lea eax, [esi + 0x19c]
push eax
call fcn.005037a0
add esp, 4
test al, al
je 0x504a29
mov ecx, dword [ebp - 0x58]
mov eax, dword [esi + 0x1a8]
inc ebx
mov dl, byte [ebp - 0x45]
mov byte [eax], dl
mov edx, ecx
mov eax, dword [ebp - 0x68]
inc dword [esi + 0x1a8]
mov eax, dword [eax + 0x14]
cmp ebx, eax
jl 0x504f30
mov ebx, dword [ebp - 0x44]
mov edx, dword [ebp - 0x68]
mov dword [ebp - 0x44], ebx
mov ebx, ecx
jmp 0x504f9f
mov ebx, dword [ebp - 0x60]
mov edx, ecx
push eax
push dword [edx + 0x10]
lea eax, [ebp - 0x3c]
push eax
call fcn.005045a0
add esp, 0xc
nop
mov al, byte [edi]
inc edi
cmp al, 0x3a
jne 0x504fb0
xor eax, eax
cmp byte [edi], al
je 0x504fc7
nop dword [eax]
inc eax
cmp byte [eax + edi], 0
jne 0x504fc0
push eax
lea eax, [ebp - 0x3c]
push edi
push eax
call fcn.005045a0
mov ecx, dword [ebp - 0x44]
add esp, 0xc
nop dword [eax + eax]
mov eax, dword [esi + 0x1a8]
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x88], ecx
cmp eax, dword [esi + 0x1a4]
jne 0x50500e
lea eax, [esi + 0x19c]
push eax
call fcn.005037a0
add esp, 4
test al, al
je 0x504a29
mov ecx, dword [esi + 0x1a8]
mov al, byte [edi]
mov byte [ecx], al
inc dword [esi + 0x1a8]
mov al, byte [edi]
inc edi
mov ecx, dword [ebp - 0x88]
test al, al
jne 0x504fe0
lea eax, [ebp - 0x3c]
push eax
call fcn.00504430
mov edx, dword [ebp - 0x88]
mov ecx, eax
mov dword [ebp - 0x78], ecx
add esp, 4
mov dword [ebp - 0x44], edx
xor bl, bl
lea eax, [edx - 1]
mov edx, dword [ebp - 0x4c]
mov dword [ebp - 0x94], eax
and eax, ecx
mov ecx, dword [ebp - 0x58]
mov dword [ebp - 0x50], eax
lea eax, [eax + eax*2]
mov edi, dword [ecx]
mov dword [ebp - 0x64], edi
mov edi, ecx
mov ecx, dword [ebp - 0x64]
mov dword [ebp - 0x60], edi
cmp dword [ecx + eax*4], edx
mov ecx, edi
mov edx, dword [ebp - 0x88]
jne 0x505123
mov edi, edx
mov dword [ebp - 0x60], ecx
mov edx, dword [ebp - 0x50]
mov ecx, dword [ebp - 0x64]
mov dword [ebp - 0x44], edi
nop word [eax + eax]
lea eax, [edx + edx*2]
mov edx, dword [ebp - 0x78]
cmp edx, dword [ecx + eax*4 + 4]
mov edx, dword [ebp - 0x50]
jne 0x5050d5
mov edi, dword [ebp - 0x64]
mov ecx, dword [esi + 0x1ac]
mov edi, dword [edi + eax*4 + 8]
mov al, byte [ecx]
cmp al, byte [edi]
jne 0x5050ca
mov dl, al
sub edi, ecx
mov al, dl
test dl, dl
je 0x5050c7
mov al, byte [ecx + 1]
inc ecx
mov dl, al
cmp al, byte [edi + ecx]
je 0x5050b6
mov edx, dword [ebp - 0x50]
test al, al
je 0x504c72
mov edi, dword [ebp - 0x44]
test bl, bl
jne 0x5050f8
mov eax, dword [ebp - 0x94]
mov ebx, eax
movzx ecx, byte [esi + 0x190]
not ebx
and ebx, dword [ebp - 0x78]
dec ecx
shr ebx, cl
shr eax, 2
and bl, al
or bl, 1
movzx ecx, bl
sub edx, ecx
cmp dword [ebp - 0x50], ecx
mov ecx, dword [ebp - 0x64]
lea eax, [edx + edi]
cmovge eax, edx
mov edx, eax
mov dword [ebp - 0x50], edx
lea eax, [edx + edx*2]
mov edx, dword [ebp - 0x4c]
cmp dword [ecx + eax*4], edx
mov edx, dword [ebp - 0x50]
je 0x505090
mov edi, dword [ebp - 0x60]
cmp byte [esi + 0xe9], 0
je 0x50519e
mov ecx, dword [esi + 0x1a8]
mov al, byte [esi + 0x1d4]
mov edx, dword [ebp - 0x44]
mov byte [ecx - 1], al
mov eax, dword [ebp - 0x68]
mov ecx, dword [ebp - 0x60]
mov eax, dword [eax]
mov edi, dword [eax]
nop dword [eax + eax]
mov eax, dword [esi + 0x1a8]
mov ebx, ecx
mov dword [ebp - 0x44], edx
cmp eax, dword [esi + 0x1a4]
jne 0x50517d
lea eax, [esi + 0x19c]
push eax
call fcn.005037a0
add esp, 4
test al, al
je 0x504a29
mov edx, dword [ebp - 0x44]
mov ecx, dword [esi + 0x1a8]
mov al, byte [edi]
mov byte [ecx], al
mov ecx, ebx
inc dword [esi + 0x1a8]
mov al, byte [edi]
inc edi
test al, al
jne 0x505150
mov edi, ebx
mov dword [ebp - 0x44], edx
mov dword [ebp - 0x60], edi
sub dword [ebp - 0x6c], 1
mov eax, dword [esi + 0x1a8]
mov edx, dword [esi + 0x1ac]
mov ebx, dword [ebp - 0x4c]
mov dword [esi + 0x1ac], eax
mov eax, dword [ebp - 0x90]
mov dword [eax], edx
mov eax, dword [ebp - 0x50]
lea ecx, [eax + eax*2]
mov eax, dword [edi]
mov dword [eax + ecx*4], ebx
mov eax, dword [edi]
mov ebx, dword [ebp - 0x78]
mov dword [eax + ecx*4 + 4], ebx
mov eax, dword [edi]
mov dword [eax + ecx*4 + 8], edx
je 0x5051f7
mov eax, dword [ebp - 0x5c]
mov ecx, dword [ebp - 0x40]
jmp 0x5051e7
mov byte [edi - 1], 0
add eax, 2
mov dword [ebp - 0x5c], eax
cmp eax, ecx
jl 0x504e60
jmp 0x505224
mov ecx, dword [ebp - 0x5c]
mov ebx, dword [ebp - 0x40]
add ecx, 2
cmp ecx, ebx
jge 0x505224
mov esi, dword [ebp - 0x54]
nop word [eax + eax]
mov eax, dword [esi + ecx*4]
add ecx, 2
mov byte [eax - 1], 0
cmp ecx, ebx
jl 0x505210
mov esi, dword [ebp - 0x8c]
mov eax, dword [ebp - 0x7c]
mov ecx, dword [eax]
test ecx, ecx
je 0x505240
nop dword [eax]
mov eax, dword [ecx + 0xc]
mov eax, dword [eax]
mov byte [eax - 1], 0
mov ecx, dword [ecx + 4]
test ecx, ecx
jne 0x505230
cmp byte [esi + 0xe8], 0
je 0x5053d0
mov eax, dword [ebp - 0x70]
mov edi, dword [eax + 4]
test edi, edi
je 0x505289
mov edi, dword [edi + 4]
test edi, edi
jne 0x505274
pop edi
pop esi
mov eax, 0x1b
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004c9126
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x84]
mov ebx, dword [eax]
nop dword [eax]
mov al, byte [ebx]
inc ebx
cmp al, 0x3a
jne 0x505280
jmp 0x5052a2
mov eax, dword [ebp - 0x80]
mov edi, dword [eax + 0x9c]
test edi, edi
je 0x5053d0
mov eax, dword [ebp - 0x84]
mov ebx, dword [eax]
xor ecx, ecx
mov dword [ebp - 0x80], ecx
cmp byte [esi + 0xe9], cl
je 0x5052c3
mov eax, dword [edi]
mov edx, dword [eax]
test edx, edx
je 0x5052c3
lea eax, [edx + ecx]
inc ecx
cmp byte [eax], 0
jne 0x5052b7
mov dword [ebp - 0x80], ecx
mov edx, dword [ebp - 0x84]
mov dword [edx + 4], ebx
mov eax, dword [edi + 0x14]
mov dword [edx + 0x10], eax
mov eax, dword [edi]
mov eax, dword [eax]
mov dword [edx + 8], eax
mov dword [edx + 0x14], ecx
xor edx, edx
nop
lea eax, [ebx + edx]
inc edx
cmp byte [eax], 0
jne 0x5052e0
mov eax, dword [ebp - 0x74]
sub eax, ecx
mov dword [ebp - 0x7c], edx
cmp dword [edi + 0x14], eax
jg 0x504a29
mov eax, dword [edi + 0x14]
sub dword [ebp - 0x74], eax
sub dword [ebp - 0x74], ecx
cmp edx, dword [ebp - 0x74]
jg 0x504a29
add eax, ecx
add eax, edx
cmp eax, dword [edi + 0x18]
jle 0x505387
cmp eax, 0x7fffffe7
jg 0x504a29
add eax, 0x18
mov dword [ebp - 0x8c], eax
push eax
mov eax, dword [esi + 0xc]
call eax
add esp, 4
mov dword [ebp - 0x58], eax
test eax, eax
je 0x504a29
push dword [edi + 0x14]
mov ecx, dword [ebp - 0x8c]
push dword [edi + 0x10]
mov dword [edi + 0x18], ecx
push eax
call fcn.004ca0e0
mov ecx, dword [esi + 0x168]
add esp, 0xc
test ecx, ecx
je 0x505373
mov edx, dword [ebp - 0x58]
mov eax, dword [ecx + 0xc]
cmp eax, dword [edi + 0x10]
jne 0x50536d
mov dword [ecx + 0xc], edx
mov ecx, dword [ecx]
test ecx, ecx
jne 0x505362
push dword [edi + 0x10]
mov eax, dword [esi + 0x14]
call eax
mov eax, dword [ebp - 0x58]
add esp, 4
mov edx, dword [ebp - 0x7c]
mov dword [edi + 0x10], eax
mov eax, dword [edi + 0x10]
add eax, dword [edi + 0x14]
push edx
push ebx
push eax
mov dword [ebp - 0x8c], eax
call fcn.004ca0e0
mov edx, dword [ebp - 0x80]
add esp, 0xc
test edx, edx
je 0x5053c5
mov ecx, dword [ebp - 0x8c]
add ecx, dword [ebp - 0x7c]
mov al, byte [esi + 0x1d4]
push edx
mov byte [ecx - 1], al
mov eax, dword [edi]
push dword [eax]
push ecx
call fcn.004ca0e0
add esp, 0xc
mov ecx, dword [ebp - 0x84]
mov eax, dword [edi + 0x10]
mov dword [ecx], eax
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004c9126
mov esp, ebp
pop ebp
ret